Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > Announcements > Vendor Announcements

Vendor Announcements News and Information from Vendors - New Product Releases, New Versions, ...(moderated)

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-02-2010, 3:17 PM
Neodynamic's Avatar
VB.NET Forum Newbie
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Dec 2005
Posts: 95
Reputation: 56
Neodynamic is on a distinguished programming path ahead
Thumbs up How to add barcoding support to ASP.NET Mobile websites (VB.NET and C#)

Prerequisites
- 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:









- Add a new "Mobile Web Form" item to your project and design it to look like the following figure or copy and paste the markup code in the Source View.


A Mobile WebForm for displaying barcodes

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="MobileVB.aspx.vb" Inherits="MobileVB" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>



Barcode Gen ID="Image1" Runat="server" Visible="False">
Value To Encode: ID="TextBox1" Runat="server">





Barcode Now




- 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
End Sub

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.

string barcodeSymbology = this.SelectionList1.Selection.Value;

this.Image1.ImageUrl = "~/BarcodeGen.axd?S=" + barcodeSymbology + "&C=" + Server.HtmlEncode(this.TextBox1.Text) + "&BH=0.2&MS=0.04";
this.Image1.Visible = true;
}

- That's it. Build your project and test it from some Mobile Device Browser.

Remember to download and install Barcode Professional for ASP.NET in order to reproduce this sample demo.

Links:
This Demo
More Demos
Download Barcode Professional for ASP.NET
More Information about Neodynamic Barcode Professional for ASP.NET


Neodynamic
.NET Components & Controls
Neodynamic
Neodynamic Barcode Professional for ASP.NET
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
asp.net, bar code, barcode, mobile, neodynamic


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 11:40 PM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.