ASP.NET 2.0 in VB.NET


ASP.NET 2.0 in VB.NET

Postby John on Fri Sep 01, 2006 7:32 pm

Sample using Visual Basic code for ASP.Net 2.0 in Visual Studio 2005.

RenderBarcode.aspx file:

<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="RenderBarcode.aspx.vb" Inherits="RenderBarcode" %>

<%
Dim BC As Object

Response.Buffer = True

' Create the object, previously installed on the server
BC = Server.CreateObject("easyBarCode.aspBarCode")
BC.Display = 3
If Request("TypeBC") <> "" Then
BC.TypeBar = Request("TypeBC")
End If
BC.Text = Request("Text")
BC.Height = 60
Response.Clear()
Response.ContentType = "image/gif"
Response.BinaryWrite(BC.SaveVariant())

BC = Nothing
%>

Here the calling statement.

<img src="RenderBarcode.aspx?TypeBC=35&Text=<%=Session("Barcode")%>"
alt=""/>

This solution is especially nice for websites since no files are created.
John Lohmeyer
MITData, S.C.P
John
 
Posts: 1313
Joined: Wed Oct 31, 2001 10:23 am
Location: Spain

Return to BarCode & activeEasyBarCode

Who is online

Users browsing this forum: No registered users and 1 guest

cron

Fatal error: Not able to open ./cache/data_global.php in D:\Hosting\6480136\html\ForosBB3\includes\acm\acm_file.php on line 106