⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 webapp.htm

📁 非常实用的条形码制作工具
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML dir=ltr>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<title>Writing Web Applications</title>
</HEAD>
<BODY>
<h2>Writing Web Applications</h2>
<b>CONTENTS:</b>
<ol>
<li><a href="#overview">Overview</a>
<li><a href="#direct">Using directly Barcode.aspx or BarcodeHandler</a>
<li><a href="#webcontrol">Using the web server control BarcodeImage</a>
</ol>
<P>
<a name="#overview"></a>
<b>OVERVIEW</b>
<p>
For web applications, Barcode .Net is a dynamic image generator. The generated images
can be sent directly to the requesting browser without going through a file.
Images can be generated in any format (gif, png, jpeg, etc.) that's supported by the .Net Framework, 
<p>
Barcode .Net provides two ways for you to use this image generation function, through
the use of the <a href="barcodeaspx.htm">Barcode.aspx</a> file or the HTTP handler 
<a href="barcodeaspx.htm">BarcodeHandler</a>, as in,
<pre>
&lt;img src="/<i>Barcode.Net</i>/Barcode.aspx"&gt;
&lt;img src="BarcodeHandler.aspx"&gt;
</pre>
where <i>Barcode.Net</i> is assumed to be the name of your application's virtual directory.
<p>
To provide better design time support, the <a href="barcodeImageClass.htm">BarcodeImage</a> web server control is also provided; 
it can be used the same way you would the ASP.NET <b>Image</b> web server control. All BarcodeImage does
is generate the HTML <tt>&ltimg&gt;</tt> element automatically when it is processed on the server. 
So, indeed, <i>this is just an indirect way of using Barcode.aspx or BarcodeHandler</i>.

<p>
<a name="#direct"></a>
<b>USING Barcode.aspx OR BarcodeHandler</b>
<p>
First off, you can simply type 
<pre>
    http://localhost/<i>Barcode.Net</i>/Barcode.aspx
or 
    http://localhost/<i>Barcode.Net</i>/BarcodeHandler.aspx
</pre>
in your browser's URL field and press enter (first replace <i>Barcode.Net</i>
by the name of your application's virtual directory</i>). 
<p>
You should see this image,
<p>
<img src="simplest.gif">
<p>
This is is a good way of testing your environment as any error messages would
show up in your browser in place of the image. 
<p>
Typically, however, you would embed a barcode image in an HTML page by adding
<pre>
&lt;img src="/<i>Barcode.Net</i>/Barcode.aspx"&gt;
</pre>
This should generate the same image as above.
<p>
To be useful, you'll need to specify your own barcode type and data
for the barcode image. For example, 
<pre>
&lt;img src="/<i>Barcode.Net</i>/Barcode.aspx?BarcodeType=UPCA&amp;Data=07447079382"&gt;
</pre>
would generate,
<p>
<img src="sample_images/UPCA.gif">
<p>
The above examples use the Barcode.aspx file to generate barcode images.
Alternatively, you can also use BarcodeHandler. To do so,
you just need to add a configuration entry to your web application's 
ASP.NET configuration file (Web.config):
<pre>
&lt;httpHandlers&gt;
  &lt;add verb="GET" path="BarcodeHandler.aspx" type="Bokai.Barcodes.BarcodeHandler, Bokai.Barcodes" /&gt;
&lt;/httpHandlers&gt;
</pre>
Then you can use BarcodeHandler.aspx the same way you would the Barcode.aspx file, except that
for BarcodeHandler.aspx, you don't need to specify any file path (actually, any file path would be 
fine, too), because BarcodeHandler.aspx is not an actual file but just a way for you to invoke the
the HTTP handler BarcodeHandler.
<p>
<a name="#webcontrol"></a>
<b>USING THE BarcodeImage WEB SERVER CONTROL</b>
<p>
<a href="barcodeImageClass.htm">BarcodeImage</a> is a Web Server Control and can be used the same way you would the ASP.NET Image Web Server Control.
It executes on the server side to generate the HTML &lt;img src="..."&gt; element with the <i>src</i> attribute
pointing to either Barcode.aspx or BarcodeHandler.aspx. You might want to use BarcodeImage, instead of Barcode.aspx or 
BarcodeHandler.aspx directly, if you want to take advantage of the design time support of
Visual Studio .Net.

</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -