How to add barcoding support to ASP.NET Mobile websites (VB.NET and C#)
- Neodynamic Barcode Professional 5.0 (or greater) for ASP.NET (WebControl)
- Microsoft .NET Framework 2.0 (or greater)
- Microsoft Visual Studio 2005/2008, Visual Web Developer Express Edition or Microsoft Expression Web
Barcode Professional for ASP.NET Mobile technology lets you to easily create Mobile WebForms for displaying barcodes on Mobile Devices supporting XHTML-MP/C-HTML or WAP/WML standards.
In the following Step-By-Step Guide we're going to create a simple ASP.NET Mobile web page which lets you to display barcodes on Internet Browsers of Mobile Devices leveraging Barcode Professional for ASP.NET and ASP.NET Mobile framework.
Please follow these steps:
- Open your preferred ASP.NET Editor (Microsoft Visual Studio 2005/2008, Visual Web Developer Express Edition or Microsoft Expression Web) and create an ASP.NET website.
- Add a reference to Neodynamic.WebControls.BarcodeProfessional.dll assembly.
- Open the web.config file and add the following entry under httpHandlers node:
- Now code the button's click event. In the button's click event procedure we are going to generate a fixed URL barcode which in Barcode Professional is called "Codeless Barcode Generation" which automatically will detect the current mobile device's preferred image format for render the barcode image in that format (including Wireless Bitmap WBMP in WAP/WML).
Visual Basic .NET
Protected Sub Command1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Command1.Click
'Use Codeless barcode generation...
' - Please refer to web.config under HttpHanlder node for BarcodeGen settings
' - Please refer to "Codeless Barcode Generation" topic of product help for further details about params.
Dim barcodeSymbology As String = Me.SelectionList1.Selection.Value
Me.Image1.ImageUrl = "~/BarcodeGen.axd?S=" + barcodeSymbology + "&C=" + Server.HtmlEncode(Me.TextBox1.Text) + "&BH=0.2&MS=0.04"
Me.Image1.Visible = True
Visual C# .NET
protected void Command1_Click(object sender, EventArgs e)
//Use Codeless barcode generation...
// - Please refer to web.config under HttpHanlder node for BarcodeGen settings
// - Please refer to "Codeless Barcode Generation" topic of product help for further details about params.