<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>web design tutorial</title>
	<atom:link href="http://www.joyahoo.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joyahoo.net</link>
	<description>html，asp，php</description>
	<lastBuildDate>Tue, 31 Aug 2010 09:24:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ASP programming to a new instance of the code parameter search</title>
		<link>http://www.joyahoo.net/201008/asp-programming-to-a-new-instance-of-the-code-parameter-search/</link>
		<comments>http://www.joyahoo.net/201008/asp-programming-to-a-new-instance-of-the-code-parameter-search/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 09:24:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp]]></category>

		<guid isPermaLink="false">http://www.joyahoo.net/?p=659</guid>
		<description><![CDATA[&#60;%
&#8216;************ ******************* Defined constants
&#8216;&#8212;- ParameterDirectionEnum Values &#8212;-
Const adParamUnknown = &#38; H0000
Const adParamInput = &#38; H0001
Const adParamOutput = &#38; H0002
Const adParamInputOutput = &#38; H0003
Const adParamReturnValue = &#38; H0004
&#8216;&#8212;- CommandTypeEnum Values &#8212;-
Const adCmdUnknown = &#38; H0008
Const adCmdText = &#38; H0001
Const adCmdTable = &#38; H0002
Const adCmdStoredProc = &#38; H0004
Const adCmdFile = &#38; H0100
Const ...]]></description>
			<content:encoded><![CDATA[<p>&lt;%<br />
&#8216;************ ******************* Defined constants<br />
&#8216;&#8212;- ParameterDirectionEnum Values &#8212;-<br />
Const adParamUnknown = &amp; H0000<br />
Const adParamInput = &amp; H0001<br />
Const adParamOutput = &amp; H0002<br />
Const adParamInputOutput = &amp; H0003<br />
Const adParamReturnValue = &amp; H0004<span id="more-659"></span></p>
<p>&#8216;&#8212;- CommandTypeEnum Values &#8212;-<br />
Const adCmdUnknown = &amp; H0008<br />
Const adCmdText = &amp; H0001<br />
Const adCmdTable = &amp; H0002<br />
Const adCmdStoredProc = &amp; H0004<br />
Const adCmdFile = &amp; H0100<br />
Const adCmdTableDirect = &amp; H0200</p>
<p>&#8216;&#8212;- DataTypeEnum Values &#8212;-<br />
Const adEmpty = 0<br />
Const adTinyInt = 16<br />
Const adSmallInt = 2<br />
Const adInteger = 3<br />
Const adBigInt = 20<br />
Const adUnsignedTinyInt = 17<br />
Const adUnsignedSmallInt = 18<br />
Const adUnsignedInt = 19<br />
Const adUnsignedBigInt = 21<br />
Const adSingle = 4<br />
Const adDouble = 5<br />
Const adCurrency = 6<br />
Const adDecimal = 14<br />
Const adNumeric = 131<br />
Const adBoolean = 11<br />
Const adError = 10<br />
Const adUserDefined = 132<br />
Const adVariant = 12<br />
Const adIDispatch = 9<br />
Const adIUnknown = 13<br />
Const adGUID = 72<br />
Const adDate = 7<br />
Const adDBDate = 133<br />
Const adDBTime = 134<br />
Const adDBTimeStamp = 135<br />
Const adBSTR = 8<br />
Const adChar = 129<br />
Const adVarChar = 200<br />
Const adLongVarChar = 201<br />
Const adWChar = 130<br />
Const adVarWChar = 202<br />
Const adLongVarWChar = 203<br />
Const adBinary = 128<br />
Const adVarBinary = 204<br />
Const adLongVarBinary = 205<br />
Const adChapter = 136<br />
Const adFileTime = 64<br />
Const adPropVariant = 138<br />
Const adVarNumeric = 139<br />
Const adArray = &amp; H2000</p>
<p>Dim rs, cmd, cn<br />
Set cmd = Server.CreateObject (&#8220;ADODB.Command&#8221;)<br />
Set cn = Server.CreateObject (&#8220;ADODB.Connection&#8221;)<br />
&#8216;Here are connected to SQL Server 2008 database, modify the connection string of other databases.<br />
cn.Open &#8220;Provider = SQLNCLI10; Server = (local); Database = database name; Uid = database login name; Pwd = password;&#8221;<br />
With cmd<br />
    . ActiveConnection = cn<br />
    . CommandType = adCmdText<br />
    . CommandText = &#8220;Select * From BaseObject Where parentname LIKE? And contentclass =?&#8221;<br />
    . Prepared = True<br />
    . Parameters.Append. CreateParameter (&#8220;parentname&#8221;, adVarChar, adParamInput, 512, &#8220;% / ItemImage /%&#8221;)<br />
    . Parameters.Append. CreateParameter (&#8220;mengxianhui&#8221;, adVarChar, adParamInput, 512, &#8220;urn: schemas-mengxianhui-com-cn: basedocument&#8221;)<br />
     Set rs =. Execute<br />
End With<br />
While Not rs.EOF<br />
  Response.Write &#8220;&lt;li&gt;&#8221; &amp; rs (&#8220;displayname&#8221;)<br />
  rs.MoveNext<br />
Wend<br />
Set cmd = Nothing<br />
Set rs = Nothing<br />
Set cn = Nothing<br />
%&gt;</p>
<p> Can write the following format:<br />
Dim rs, cmd, cn<br />
Set cmd = Server.CreateObject (&#8220;ADODB.Command&#8221;)<br />
Set cn = Server.CreateObject (&#8220;ADODB.Connection&#8221;)<br />
&#8216;Here are connected to SQL Server 2008 database, modify the connection string of other databases.<br />
cn.Open &#8220;Provider = SQLNCLI10; Server = (local); Database = database name; Uid = database login name; Pwd = password;&#8221;<br />
With cmd<br />
    . ActiveConnection = cn<br />
    . CommandType = adCmdText<br />
    . CommandText = &#8220;Select * From BaseObject Where parentname LIKE? And contentclass =?&#8221;<br />
    . Prepared = True<br />
    . Parameters (0). Value = &#8220;% / ItemImage /%&#8221;<br />
    . Parameters (1). Value = &#8220;urn: schemas-mengxianhui-com-cn: basedocument&#8221;<br />
     Set rs =. Execute<br />
End With<br />
While Not rs.EOF<br />
  Response.Write &#8220;&lt;li&gt;&#8221; &amp; rs (&#8220;displayname&#8221;)<br />
  rs.MoveNext<br />
Wend</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyahoo.net/201008/asp-programming-to-a-new-instance-of-the-code-parameter-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>asp.net label on the label binding instance</title>
		<link>http://www.joyahoo.net/201008/asp-net-label-on-the-label-binding-instance/</link>
		<comments>http://www.joyahoo.net/201008/asp-net-label-on-the-label-binding-instance/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 09:22:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp]]></category>

		<guid isPermaLink="false">http://www.joyahoo.net/?p=656</guid>
		<description><![CDATA[Front:
&#60;Asp: Label ID = &#8220;Label1&#8243; runat = &#8220;server&#8221; Text =&#8217;&#60;%# GetName ((sender as Label). ID.Substring (5)) %&#62;&#8217;&#62;&#60;/ asp: Label&#62;
      &#60;br /&#62;
      &#60;Asp: Label ID = &#8220;Label2&#8243; runat = &#8220;server&#8221; Text =&#8217;&#60;%# GetName ((sender as Label). ID.Substring (5)) %&#62;&#8217;&#62;&#60;/ asp: Label&#62;
       &#60;br /&#62; 
      &#60;Asp: Label ID = &#8220;Label3&#8243; runat = ...]]></description>
			<content:encoded><![CDATA[<p>Front:<br />
&lt;Asp: Label ID = &#8220;Label1&#8243; runat = &#8220;server&#8221; Text =&#8217;&lt;%# GetName ((sender as Label). ID.Substring (5)) %&gt;&#8217;&gt;&lt;/ asp: Label&gt;<br />
      &lt;br /&gt;<br />
      &lt;Asp: Label ID = &#8220;Label2&#8243; runat = &#8220;server&#8221; Text =&#8217;&lt;%# GetName ((sender as Label). ID.Substring (5)) %&gt;&#8217;&gt;&lt;/ asp: Label&gt;<br />
       &lt;br /&gt; <span id="more-656"></span><br />
      &lt;Asp: Label ID = &#8220;Label3&#8243; runat = &#8220;server&#8221; Text =&#8217;&lt;%# GetName ((sender as Label). ID.Substring (5)) %&gt;&#8217;&gt;&lt;/ asp: Label&gt;<br />
      &lt;br /&gt;<br />
      &lt;Asp: Label ID = &#8220;Label4&#8243; runat = &#8220;server&#8221; Text =&#8217;&lt;%# GetName ((sender as Label). ID.Substring (5)) %&gt;&#8217;&gt;&lt;/ asp: Label&gt;<br />
  &lt;Asp: Label ID = &#8220;Label1&#8243; runat = &#8220;server&#8221; Text =&#8217;&lt;%# GetName ((sender as Label). ID.Substring (5)) %&gt;&#8217;&gt;&lt;/ asp: Label&gt;<br />
        &lt;br /&gt;<br />
        &lt;Asp: Label ID = &#8220;Label2&#8243; runat = &#8220;server&#8221; Text =&#8217;&lt;%# GetName ((sender as Label). ID.Substring (5)) %&gt;&#8217;&gt;&lt;/ asp: Label&gt;<br />
         &lt;br /&gt;<br />
        &lt;Asp: Label ID = &#8220;Label3&#8243; runat = &#8220;server&#8221; Text =&#8217;&lt;%# GetName ((sender as Label). ID.Substring (5)) %&gt;&#8217;&gt;&lt;/ asp: Label&gt;<br />
        &lt;br /&gt;<br />
        &lt;Asp: Label ID = &#8220;Label4&#8243; runat = &#8220;server&#8221; Text =&#8217;&lt;%# GetName ((sender as Label). ID.Substring (5)) %&gt;&#8217;&gt;&lt;/ asp: Label&gt;</p>
<p>Background Code:<br />
IDictionary &lt;int, string&gt; Dic = new Dictionary &lt;int, string&gt; ();<br />
   protected void Page_Load (object sender, EventArgs e)<br />
   (<br />
       if (! Page.IsPostBack)<br />
       (<br />
           BindData ();<br />
       )<br />
   )<br />
   public string GetName (object index)<br />
   (<br />
       / / If the operator returns the left of the left non-empty, otherwise it is on the right!<br />
       index = index?? &#8220;&#8221;;<br />
       int key;<br />
       int.TryParse (index.ToString (), out key);<br />
   <br />
       return Dic [key];<br />
   )<br />
   public void BindData ()<br />
   (<br />
       Dic.Add (1, &#8220;Hugo&#8221;);<br />
       Dic.Add (2, &#8220;Hu Lei&#8221;);<br />
       Dic.Add (3, &#8220;Toshibumi&#8221;);<br />
       Dic.Add (4, &#8220;Liu kin&#8221;);<br />
       DataBind ();</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyahoo.net/201008/asp-net-label-on-the-label-binding-instance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asp.nep IP address access restrictions on the design process</title>
		<link>http://www.joyahoo.net/201008/asp-nep-ip-address-access-restrictions-on-the-design-process/</link>
		<comments>http://www.joyahoo.net/201008/asp-nep-ip-address-access-restrictions-on-the-design-process/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 09:20:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp]]></category>

		<guid isPermaLink="false">http://www.joyahoo.net/?p=653</guid>
		<description><![CDATA[ip add a page is to use a ListBox, TextBox, 2 Button
In the other pages directly compared with the current IP database IP, the code below!
Add page HTML code IP restrictions
&#60;% @ Page Language = &#8220;C #&#8221; AutoEventWireup = &#8220;true&#8221; CodeFile = &#8220;ip.aspx.cs&#8221; Inherits = &#8220;admin_ip&#8221;%&#62;
&#60;! DOCTYPE html PUBLIC &#8220;- ...]]></description>
			<content:encoded><![CDATA[<p>ip add a page is to use a ListBox, TextBox, 2 Button</p>
<p>In the other pages directly compared with the current IP database IP, the code below!</p>
<p>Add page HTML code IP restrictions<br />
&lt;% @ Page Language = &#8220;C #&#8221; AutoEventWireup = &#8220;true&#8221; CodeFile = &#8220;ip.aspx.cs&#8221; Inherits = &#8220;admin_ip&#8221;%&gt;<span id="more-653"></span></p>
<p>&lt;! DOCTYPE html PUBLIC &#8220;- / / W3C / / DTD XHTML 1.0 Transitional / / EN&#8221; &#8220;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#8220;&gt;</p>
<p>&lt;html xmlns=&#8221;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&#8220;&gt;<br />
&lt;head runat=&#8221;server&#8221;&gt;<br />
    &lt;title&gt; Untitled Page &lt;/ title&gt;<br />
    &lt;link href=&#8221;../images/news.CSS&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; /&gt;<br />
&lt;/ Head&gt;<br />
&lt;body&gt;<br />
    &lt;form id=&#8221;form1&#8243; runat=&#8221;server&#8221;&gt;<br />
    &lt;div&gt;<br />
        &lt;Asp: SqlDataSource ID = &#8220;SqlDataSource1&#8243; runat = &#8220;server&#8221; ConnectionString =&#8221;&lt;%$ ConnectionStrings: book%&gt; &#8221;<br />
            PRoviderName =&#8221;&lt;%$ ConnectionStrings: book.ProviderName%&gt; &#8220;SelectCommand =&#8221; SELECT [ip] FROM [ip] &#8220;&gt;<br />
        &lt;/ Asp: SqlDataSource&gt;<br />
        &lt;table align=&#8221;center&#8221; style=&#8221;border-right: #0066cc 1px dotted; border-top: #0066cc 1px dotted; border-left: #0066cc 1px dotted; border-bottom: #0066cc 1px dotted&#8221;&gt;<br />
            &lt;tr&gt;<br />
                &lt;Td rowspan = &#8220;2&#8243; style = &#8220;width: 100px; border-right: # 33ccff 1px groove; border-top: # 33ccff 1px groove; border-left: # 33ccff 1px groove; border-bottom: # 33ccff 1px groove; &#8220;&gt;<br />
                    &lt;Asp: ListBox ID = &#8220;iplxb&#8221; runat = &#8220;server&#8221; DataSourceID = &#8220;SqlDataSource1&#8243; DataTextField = &#8220;ip&#8221;<br />
                        DataValueField = &#8220;ip&#8221; Height = &#8220;194px&#8221; Width = &#8220;153px&#8221;&gt; &lt;/ asp: ListBox&gt; &lt;/ td&gt;<br />
                &lt;td style=&#8221;width: 100px; border-right: #33ccff 1px groove; border-top: #33ccff 1px groove; border-left: #33ccff 1px groove; border-bottom: #33ccff 1px groove;&#8221;&gt;<br />
                    Fill in the standard IP address to the inside lower left text box, then click the button to add! &lt;br /&gt;<br />
                    &lt;Asp: RegularExpressionValidator ID = &#8220;RegularExpressionValidator1&#8243; runat = &#8220;server&#8221; ControlToValidate = &#8220;iptb&#8221;<br />
                        Display = &#8220;Dynamic&#8221; ErrorMessage = &#8220;IP address format is incorrect&#8221; ValidationExpression = &#8220;([0-9] (2,3 })([.])([ 0-9] (1,3 })([.] ) ([0-9] (1,3 })([.])([ 0-9] (1,3 })&#8221;&gt;&lt;/ asp: RegularExpressionValidator&gt; &lt;/ td&gt;<br />
            &lt;/ Tr&gt;<br />
            &lt;tr&gt;<br />
                &lt;td style=&#8221;width: 100px; border-right: #33ccff 1px groove; border-top: #33ccff 1px groove; border-left: #33ccff 1px groove; border-bottom: #33ccff 1px groove;&#8221;&gt;<br />
                    &lt;asp:LinkButton ID=&#8221;LinkButton1&#8243; runat=&#8221;server&#8221; OnClick=&#8221;LinkButton1_Click&#8221;&gt; to delete the selected rows &lt;/ asp: LinkButton&gt; &lt;/ td&gt;<br />
            &lt;/ Tr&gt;<br />
            &lt;tr&gt;<br />
                &lt;td style=&#8221;width: 100px; border-right: #33ccff 1px groove; border-top: #33ccff 1px groove; border-left: #33ccff 1px groove; border-bottom: #33ccff 1px groove;&#8221;&gt;<br />
                    &lt;asp:TextBox ID=&#8221;iptb&#8221; runat=&#8221;server&#8221; Width=&#8221;150px&#8221;&gt; 61.139.33.22 &lt;/ asp: TextBox&gt; &lt;/ td&gt;<br />
                &lt;td style=&#8221;width: 100px; border-right: #33ccff 1px groove; border-top: #33ccff 1px groove; border-left: #33ccff 1px groove; border-bottom: #33ccff 1px groove;&#8221;&gt;<br />
                    &lt;asp:Button ID=&#8221;Button1&#8243; runat=&#8221;server&#8221; OnClick=&#8221;Button1_Click&#8221; Text=&#8221;增加&#8221; Width=&#8221;80px&#8221; /&gt; &lt;/ td&gt;<br />
            &lt;/ Tr&gt;<br />
      &lt;/ Table&gt;<br />
     <br />
    &lt;/ Div&gt;<br />
    &lt;/ Form&gt;<br />
&lt;/ Body&gt;<br />
&lt;/ Html&gt;<br />
IP Add page CS code restrictions<br />
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Collections;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;</p>
<p>public partial class admin_ip: System.Web.UI.Page<br />
(<br />
    protected void Page_Load (object sender, EventArgs e)<br />
    (<br />
        Server.Execute (&#8220;chklog.aspx&#8221;);<br />
    )<br />
    protected void Button1_Click (object sender, EventArgs e)<br />
    (<br />
         <br />
        iplxb.Items.Add (iptb.Text);<br />
        odb.insert (&#8220;insert into ip (ip) values (&#8216;&#8221; + iptb.Text + &#8220;&#8216;)&#8221;);<br />
    )<br />
    protected void LinkButton1_Click (object sender, EventArgs e)<br />
    (<br />
        for (int i = 0; i &lt;iplxb.Items.Count; i + +)<br />
        (<br />
            if (iplxb.Items [i]. Selected)<br />
            (<br />
                odb.insert (&#8220;delete from ip where ip = &#8216;&#8221; + iplxb.SelectedItem.Text +&#8221;&#8216;&#8221;);<br />
                iplxb.Items.Remove (iplxb.SelectedItem.Text);<br />
            )<br />
        )<br />
    )<br />
)<br />
Was necessary to restrict the IP code for the page is called page<br />
 protected void Page_Load (object sender, EventArgs e)<br />
    (<br />
        string ip = Request.UserHostAddress.ToString ();</p>
<p>            if (Convert.ToInt32 (odb.scr (&#8220;select count (*) from [ip] where ip = &#8216;&#8221; + ip + &#8220;&#8216;&#8221;))&gt; 0)<br />
            Response.Write (&#8220;Sorry, your IP is limited access, please contact the administrator&#8221;);<br />
    )<br />
)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyahoo.net/201008/asp-nep-ip-address-access-restrictions-on-the-design-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Frequently  questions and answers of ASP set</title>
		<link>http://www.joyahoo.net/201008/frequently-questions-and-answers-of-asp-set/</link>
		<comments>http://www.joyahoo.net/201008/frequently-questions-and-answers-of-asp-set/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 09:16:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp]]></category>

		<guid isPermaLink="false">http://www.joyahoo.net/?p=650</guid>
		<description><![CDATA[As Microsoft&#8217;s website and database solution, ASP because of the unique operating system technologies such as Microsoft backing support, has been developed rapidly and is being more and more popular, in the current building in e-commerce sites have Many are using ASP to write programs.
Recently, a lot of readers to ...]]></description>
			<content:encoded><![CDATA[<p>As Microsoft&#8217;s website and database solution, ASP because of the unique operating system technologies such as Microsoft backing support, has been developed rapidly and is being more and more popular, in the current building in e-commerce sites have Many are using ASP to write programs.<span id="more-650"></span></p>
<p>Recently, a lot of readers to learn from our ASP method of consultation and study some of the problems encountered, some of which are a beginner and frequently encountered problems. To help readers in the process of learning ASP ASP deepen understanding, and can effectively solve the problems encountered, we are more representative of the special collection of some of the problems out and in cite 11 Jiyu to answer in the hope This is the limited space here to learn ASP for your help.</p>
<p>1, issue: ASP is a programming language?</p>
<p>A: ASP is not a programming language, but a development environment. ASP provides a server-side execution environment, which uses a special symbol () to distinguish between translation of HTML and must be sent to the client server command. It can execute commands including the HTML language, Microsoft VBScript, and Microsoft Jscript, etc., so you can create powerful Web applications.</p>
<p>2, issue: the Web server to accommodate multiple Web sites, you can use PWS?</p>
<p>A: In the PWS can only accommodate a Web site. In order to accommodate the same number of Web sites on a computer, need to use Windows NT Server or Windows 2000 Server / Professional, and IIS.</p>
<p>3, issue: how to use the six built-in ASP objects?</p>
<p>A: ASP provides a number of embedded objects, you can not set up directly in order to access and use them, the six main targets are: a request (Request) object, and response (Response) object, session (Session) object, application (Application) object, the server (Server) object, Cookies object, the six object server (Server) object to load the other components, which can extend the functions of ASP.</p>
<p>Object created using Server.CreateObject, it&#8217;s life cycle when it began to establish, in its end of the process at the end of the page. If you want to use the object across pages, you can use the Session object to keep track of objects created Server.CreateObject.</p>
<p>4, issue: Why Response.Redirect when using the following error: &#8220;heading error, the title has to write HTTP client browser, the title of any HTTP changes made to the written page content before?&#8221;</p>
<p>Answer: Response.Redirect can be transferred to another web page, use the grammatical structure like this: Response.Redirect URL, where URL address can be relative or absolute address, but use in IIS4.0 IIS5.0 to use in different.</p>
<p>Pages in IIS4.0 transfer any data to be in none of the output to the browser before the client, or an error. The data here include the HTML of the so-called label, for example: &lt;HTML&gt;, &lt;BODY&gt; and so on, has been improved in IIS5.0, IIS5.0 by default in the buffer is turned on, this error is not re-generate.</p>
<p> Response Buffer object in a property, the property can be set to Wang Zhan Shi Pi in the treatment immediately after ASP to transfer data to the client, but to set the property must also transfer any data to the client .</p>
<p>To be safe, regardless of what ASP is running platform, began to write on the page &lt;% Response.Buffer = True%&gt;, the buffer is set to open, this error will not happen.</p>
<p>5, issue: buffer output for web traffic have no effect?</p>
<p>A: In the larger Web page, the first part appeared in the browser may be some delays, but the entire Web page loading speed is faster than without the buffer.</p>
<p>6, issue: when the form is submitted in the absence of the value of query string can use the Request.QueryString collection?</p>
<p>A: Request object to read data in the browser, it only can read the contents of form fields can also be used to read back the parameters included in the website, regardless of the request Zifu Chuan Zen Yang to the linked address in on the Request Lai that are no different. Submit a form using the get method, or follow the link to an additional query string values of all the query string, can use the Request.QueryString collection.</p>
<p>7, issue: ASP script I wrote a lot of comments, this will not affect the speed of server processing ASP files?</p>
<p>A: In the process of writing programs for comment is a good habit. The foreign technicians test, with too many notes in the ASP file will drop the overall performance of only 0.1%, which means that basically does not feel the practical application server performance degradation.</p>
<p>8, issue: need to be in the beginning of each ASP file using the &lt;% @ LANGUAGE = VBScript%&gt;?</p>
<p>A: In the beginning of each ASP file using the &lt;% @ LANGUAGE = VBScript%&gt; code is used to inform the server is using VBScript to write programs, but as the default program language is ASP VBScript, so you can ignore the normal operation of this code However, the scripting language if the program is JavaScrip, the first line in the program will need to specify the scripting language used.</p>
<p>9, issue: I have no need to use each ASP file &#8220;Option Explicit&#8221;?</p>
<p>A: In practical applications, VBScript variable concept has been blurred, allowing direct use of the variable, instead of Dim statement variables, but this is not a good habit, easily lead to error, because it is possible to repeat the definition of a variable. We can use the Option Explicit in the program statement, so that when using a variable, you must first declare it, if the use of the variable has not been declared, run-time, the program error.</p>
<p>Proved, ASP file using the &#8220;Option Explicit&#8221; can make opportunities to a minimum error, and will greatly enhance the overall performance.</p>
<p>10, issue: what to run ASP file security?</p>
<p>A: ASP code to provide a good protection mechanism, and all of the ASP code is executed on the server and only returned to the client code execution results. But people still do not rule out a malicious Web server to the deliberate destruction, so in the preparation of ASP files must pay attention to security issues.</p>
<p>Although the introduction of ASP files to inc as the extension, where it is recommended to ASP as the file extension lead. When the code in the security mechanism of Web Server on a bad run, just enter in the address bar the address Yinru files (inc the extension name), you can browse the contents of the introduction of paper, this is because the Web Server, If there is no good definition of a particular type of analysis (such as inc) in the dynamic link library, the source file to be displayed.</p>
<p>Also, do not put the database files on the internal site structure, so that when a malicious person access to the database path, you can easily access the database, and then arbitrarily change the database contents. Better approach is to set up a data source name for the database DSN (Date Source Name), stored in the DSN to connect to the specified data about the provider of information, including: &#8220;the physical location of the database, for accessing the database driver type of driver to access the database and any other required parameters &#8220;, during database access can directly access the DSN.</p>
<p>11, issue: Review of Web database management system, which issues should be considered?</p>
<p>Answer: In the evaluation of a Web database management system must take into account three aspects: multi-user problem; the establishment of relational Web database should be the; database security issues.</p>
<p>12, issue: ADO is what it is to operate the database?</p>
<p>A: ADO&#8217;s full name is the ActiveX Data Object (ActiveX Data Objects), is a set of optimized access to the database-specific set of objects, it provides a complete site ASP database solution, which acts on the server side, providing a database containing information home page content, by executing SQL commands, allowing users to type in the browser screen, update, and delete the site databases.</p>
<p>ADO include Connection, Recordset, and Command of three objects, their primary function is as follows:</p>
<p>· Connection object: for open or connect to the database file;</p>
<p>· Recordset object: access database content;</p>
<p>· Command object: actions on the database queries issued instructions, and the implementation of SQL Server stored procedure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyahoo.net/201008/frequently-questions-and-answers-of-asp-set/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use the idea of JSP to do ASP</title>
		<link>http://www.joyahoo.net/201008/use-the-idea-of-jsp-to-do-asp/</link>
		<comments>http://www.joyahoo.net/201008/use-the-idea-of-jsp-to-do-asp/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 03:14:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp]]></category>

		<guid isPermaLink="false">http://www.joyahoo.net/?p=648</guid>
		<description><![CDATA[  Functionality of the program with a general framework, in fact, can add their own features, such as the beginning of the database connection, you can first set
Variable then INIT () to select different types of databases
&#60;%
&#8216;On Error Resume Next
Class ConnEx
public ConnEx
public DBpath&#8217;&#8212;&#8212;&#8212; database path
public DBtype&#8217;&#8212;&#8212;&#8212; database type 1 (Access) ...]]></description>
			<content:encoded><![CDATA[<p>  Functionality of the program with a general framework, in fact, can add their own features, such as the beginning of the database connection, you can first set</p>
<p>Variable then INIT () to select different types of databases<span id="more-648"></span></p>
<p>&lt;%<br />
&#8216;On Error Resume Next<br />
Class ConnEx<br />
public ConnEx<br />
public DBpath&#8217;&#8212;&#8212;&#8212; database path<br />
public DBtype&#8217;&#8212;&#8212;&#8212; database type 1 (Access) 2 (SqlServer) 3 (expandable)<br />
public ConnMethod&#8217;&#8212;&#8212;&#8211; connection (DSN, non-DSN)<br />
public User<br />
public Pass<br />
Sub Class_initialize<br />
End Sub</p>
<p>Sub Init ()<br />
ConnStr = &#8220;Driver = (Microsoft Access Driver (*. mdb)); dbq =&#8221; &amp; Server.MapPath (&#8220;Date.mdb&#8221;)<br />
Set ConnEx = Server.Createobject (&#8220;ADODB.CONNECTION&#8221;)<br />
ConnEx.Open ConnStr<br />
CatchError (&#8220;Class_Terminate&#8221;)<br />
End Sub</p>
<p>Sub CatchError (Str)<br />
If Err Then<br />
Err.Clear<br />
Class_Terminate ()<br />
Response.Write (&#8220;caught error, the program ended! In&#8221; &amp; Str &amp; &#8220;Office&#8221;)<br />
Response.End ()<br />
End If<br />
End Sub</p>
<p>&#8216;******************************************<br />
&#8216;* SQL statement to find records by the existence of error-prone<br />
&#8216;******************************************</p>
<p>Function HasRecordBySql (Sql)<br />
Call CheckSql (Sql, &#8220;R&#8221;)<br />
Dim Rs, HasR<br />
Set Rs = ConnEx.Execute (Sql)<br />
CatchError (&#8220;HasReordSql&#8221;)<br />
If Not (Rs.eof Or Rs.bof) Then<br />
HasR = False<br />
Else<br />
HasR = True<br />
End If<br />
Rs.Close<br />
Set Rs = Nothing<br />
HasRecordBySql = HasR<br />
End Function</p>
<p>&#8216;***************************************<br />
&#8216;* ID to find the records by the existence of<br />
&#8216;***************************************</p>
<p>Function HasRecordById (StrTableName, IntID)<br />
&#8216;CheckValue (IntID, 1)<br />
Dim Rs, HasR<br />
Sql = &#8220;Select top 1 * from&#8221; &amp; StrTableName &amp; &#8220;Where Id =&#8221; &amp; IntID<br />
Call CheckSql (Sql, &#8220;R&#8221;)<br />
Set Rs = ConnEx.Execute (Sql)<br />
CatchError (&#8220;HasRecordByID&#8221;)<br />
If Not (Rs.eof Or Rs.bof) Then<br />
HasR = False<br />
Else<br />
HasR = True<br />
End If<br />
Rs.close<br />
Set Rs = Nothing<br />
HasRecordById = HasR<br />
End Function</p>
<p>&#8216;**********************************************<br />
&#8216;* Get record set by SQL statement<br />
&#8216;**********************************************<br />
Function GetRsBySql (Sql)<br />
Call CheckSql (Sql, &#8220;R&#8221;)<br />
Dim Rs<br />
Set Rs = Server.CreateObject (&#8220;Adodb.RecordSet&#8221;)<br />
Rs.Open Sql, ConnEx, 1,1<br />
Set GetRsBySql = Rs<br />
End Function</p>
<p>&#8216;*********************************************<br />
&#8216;* To obtain the value of a field<br />
&#8216;*********************************************<br />
Function GetValueBySql (Sql)<br />
Call CheckSql (Sql, &#8220;R&#8221;)<br />
Dim Rs, ReturnValue<br />
Set Rs = ConnEx.Execute (Sql)<br />
CatchError (&#8220;GetValueBySql&#8221;)<br />
If Not (Rs.Eof Or Rs.Bof) Then<br />
ReturnValue = Rs (0)<br />
Else<br />
ReturnValue = &#8220;no record&#8221;<br />
End If<br />
Rs.Close<br />
Set Rs = Nothing<br />
GetValueBySql = ReturnValue<br />
End Function</p>
<p>&#8216;================================================= = Update, Insert ===================================</p>
<p>&#8216;*********************************************<br />
&#8216;* Using SQL to modify data<br />
&#8216;*********************************************<br />
Function UpdateBySql (Sql)<br />
Call CheckSql (Sql, &#8220;w&#8221;)<br />
ConnEx.Execute (Sql)<br />
CatchError (&#8220;UpdateBySql&#8221;)<br />
UpdateBySql = True<br />
End Function</p>
<p>&#8216;********************************************<br />
&#8216;* Insert data using SQL statements<br />
&#8216;********************************************<br />
Function InsertBySql (Sql)<br />
Call CheckSql (Sql, &#8220;w&#8221;)<br />
ConnEx.Execute (Sql)<br />
CatchError (&#8220;InsertBySql&#8221;)<br />
InsertBySql = True<br />
End Function</p>
<p>&#8216;================================================= ===== Delete ========================================</p>
<p>&#8216;********************************************<br />
&#8216;* Deleted by SQL statement<br />
&#8216;********************************************<br />
Function DeleteBySql (Sql)<br />
Call CheckSql (Sql, &#8220;D&#8221;)<br />
ConnEx.Execute (Sql)<br />
CatchError (&#8220;DeleteBySql&#8221;)<br />
DeleteBySql = True<br />
End Function</p>
<p>&#8216;********************************************<br />
&#8216;* Check the SQL statement permissions, according to Flag to detect the signs have the permission statement<br />
&#8216;********************************************<br />
Sub CheckSql (Sql, Flag)<br />
Dim StrSql, SinCounts, DouCounts, i<br />
StrSql = Lcase (Sql)<br />
SinCounts = 0<br />
DouCounts = 0<br />
For i = 1 to Len (StrSql)<br />
If Mid (StrSql, i, 1) = &#8220;&#8216;&#8221; Then SinCounts = SinCounts + 1<br />
If Mid (StrSql, i, 1) = &#8220;&#8221; &#8220;&#8221; Then DouConnts = DouCounts + 1<br />
Next</p>
<p>If (SinCounts Mod 2) &lt;&gt; 0 Or (DouCounts Mod 2) &lt;&gt; 0 Or Instr (StrSql ,&#8221;;&#8221;)&gt; 0 Then<br />
Call Class_Terminate ()<br />
Response.Write<br />
Response.End ()<br />
End If<br />
Select Case Flag<br />
Case &#8220;R&#8221;, &#8220;r&#8221;:<br />
If Instr (StrSql, &#8220;delete&#8221;)&gt; 0 Or Instr (StrSql, &#8220;update&#8221;) Or Instr (StrSql, &#8220;drop&#8221;)&gt; 0 Or Instr (StrSql, &#8220;insert&#8221;)&gt; 0 Then<br />
Class_Terminate ()<br />
Response.Write (&#8220;Permission denied, no permission to write to&#8221;)<br />
Response.End ()<br />
End If<br />
Case &#8220;W&#8221;, &#8220;w&#8221;:<br />
If Instr (StrSql, &#8220;delete&#8221;)&gt; 0 Or Instr (StrSql, &#8220;drop&#8221;)&gt; 0 Or Instr (StrSql, &#8220;select&#8221;)&gt; 0 Then<br />
Class_Terminate ()<br />
Response.Write<br />
Response.End ()<br />
End If<br />
Case &#8220;D&#8221;, &#8220;d&#8221;:<br />
Case Else:<br />
Response.Write<br />
End Select<br />
End Sub</p>
<p>Sub Class_Terminate<br />
If Not IsEmpty (FriendConn) Then<br />
FriendConn.Close<br />
Set FriendConn = Nothing<br />
CatchError ()<br />
End If<br />
End Sub<br />
End Class<br />
%&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyahoo.net/201008/use-the-idea-of-jsp-to-do-asp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comprehensive Analysis of the Server object</title>
		<link>http://www.joyahoo.net/201008/comprehensive-analysis-of-the-server-object/</link>
		<comments>http://www.joyahoo.net/201008/comprehensive-analysis-of-the-server-object/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 03:11:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp]]></category>

		<guid isPermaLink="false">http://www.joyahoo.net/?p=646</guid>
		<description><![CDATA[  Server object provides access to the server, the methods and properties. Most of the methods and attributes as utility functions provided.
Syntax:
Server.property &#124; method
Property (property)
Server object has only one attribute: ScriptTimeout program to run the maximum time
Method (Methods)
CreateObject an object instance.
Execute the implementation of an asp file
GetLastError returns an error ...]]></description>
			<content:encoded><![CDATA[<p>  Server object provides access to the server, the methods and properties. Most of the methods and attributes as utility functions provided.</p>
<p>Syntax:</p>
<p>Server.property | method</p>
<p>Property (property)</p>
<p>Server object has only one attribute: ScriptTimeout program to run the maximum time<span id="more-646"></span></p>
<p>Method (Methods)</p>
<p>CreateObject an object instance.</p>
<p>Execute the implementation of an asp file</p>
<p>GetLastError returns an error code</p>
<p>HTMLEncode HTML code on the specified conversion.</p>
<p>MapPath a relative path into an absolute path.</p>
<p>Transfer all current state information will be sent to another asp file</p>
<p>URLEncode in the form of transformation of the specified URL code, including spaces</p>
<p>Server object method details</p>
<p>CreateObject</p>
<p>Grammar</p>
<p>Server.CreateObject (progID)</p>
<p>Parameter</p>
<p>progID</p>
<p>Specify the component name to create the following format: [Vendor.] Component [. Version].</p>
<p>Highlights:</p>
<p>In general, using the Server.CreateObject method to create the object has page scope. That said, when the asp page execution procedure finished, this object will automatically disappear.</p>
<p>To create a Session or Application scope has the object, you can use Global.asa file</p>
<p>Execute</p>
<p>Execute method calls an ASP file and execute it calls the ASP file like this exists in the same ASP file. This is much like many languages in the class of the call.</p>
<p>Grammar</p>
<p>Server.Execute (Path)</p>
<p>Parameter</p>
<p>Path</p>
<p>Asp file that specifies the implementation of the path. So it is an absolute path, then it must be a ASP application in the same place (directory).</p>
<p>Explain</p>
<p>Server.Execute method provides a way to differentiate a complex ASP applications for the small units to perform the method. In this way, you can build an ASP library, you can easily call you when you need it in the ASP file library. This would seem to SSI up! Hei hei!</p>
<p>When IIS ASP file under the specified path after you perform this ASP file, it will automatically return to the previous ASP file. This just completed the implementation of the ASP document may change the HTTP head. But, like other of the ASP file, when the program attempts to change the http head, they would error!</p>
<p>The path parameter can include an inquiry message.</p>
<p>If you are calling and call the ASP files contain the same Functions, Functions only if they play a role in the ASP file. For example, if the following two files in the ASP1 and ASP2 contain Functions to give up the program. First ASP1 call ASP2, then ASP2 of the OnTransactionAbort started, when ASP2 is finished, ASP1 in OnTransactionAbort just started.</p>
<p>ASP1:<br />
&lt;% @ Transaction = Required%&gt;<br />
&lt;%<br />
Server.Execute (&#8220;Page22.asp&#8221;)</p>
<p>Sub OnTransactionAbort</p>
<p>Sub OnTransactionCommit<br />
%&gt;<br />
Asp2.asp:<br />
&lt;% @<br />
Transaction = Required</p>
<p>Sub OnTransactionAbort</p>
<p>Sub OnTransactionCommit<br />
%&gt;<br />
Example<br />
ASP1</p>
<p>&lt;% Response.Write (&#8220;I am going to execute ASP2&#8243;)<br />
Server.Execute (&#8220;/ myasps/asp2.asp&#8221;)<br />
%&gt;<br />
ASP2</p>
<p>&lt;% Response.Write (&#8220;Here I am&#8221;)%&gt;</p>
<p>GetLastError</p>
<p>GetLastError method returns an ASPError Object to describe an error message. This method only applies to anything in the asp file to send prior to the user machine.</p>
<p>Grammar</p>
<p>Server.GetLastError ()</p>
<p>Points</p>
<p>If a 500; 100 user error has been defined in an asp application, it refers to a. Asp as the extension. Under such circumstances, in this age when the program runs when an error occurs, the server will be automatically transmitted to Server.Transfer to this that is running the ASP 页面. ASP application will be effective treatment for such errors. In addition, the ASPError Object must be effective, so you can see the server error message to you to change the files!</p>
<p>Web Site in general are based on the file \ iishelp \ common \ 500-100.asp to construct. You can use it to execute a asp error, of course, you can define their own! . If you want to change to another asp file to perform these user errors. Then you can use IIS in the snap-in.</p>
<p>Note: When IIS found a asp file or an error in the global.asa file, then a 500; 100 user error generated. The following procedure will not perform!</p>
<p>Example</p>
<p>The following are three examples of errors generated by different user error. Three errors are:</p>
<p>Compile Error</p>
<p>Run Error</p>
<p>Logic error</p>
<p>The first example shows a compile error when IIS is trying to contain a file generated. This error will be generated because the included file does not define the required parameters. The second example shows a running error, the program was interrupted because the program does not &#8220;next&#8221;. The third example shows a logic error, because the program attempts to divide a 0. Not do it!</p>
<p>Example 1</p>
<p>&lt;%<br />
response.write &#8220;hello&#8221;<br />
%&gt;</p>
<p>Example 2</p>
<p>&lt;%<br />
dim I<br />
for i = 1 to 1<br />
nxt<br />
%&gt;</p>
<p>Example 3</p>
<p>&lt;%<br />
dim i, j<br />
dim sum<br />
sum = 0<br />
j = 0</p>
<p>for i = 1 to 10<br />
sum = sum +1<br />
next</p>
<p>sum = sum / j<br />
%&gt;</p>
<p>HTMLEncode</p>
<p>HTMLEncode method specified HTML encoded string.</p>
<p>Grammar</p>
<p>Server.HTMLEncode (string)</p>
<p>Parameter<br />
the character string to be encoded</p>
<p>Example</p>
<p>The following procedures:<br />
&lt;% = Server.HTMLEncode (&#8220;The paragraph tag:&#8221;)%&gt;<br />
Output:</p>
<p>The paragraph tag:</p>
<p>Note that the program executed in the browser to see is:</p>
<p>The paragraph tag:</p>
<p>But if you use &#8220;View Source&#8221; to look at it, the source code is not.</p>
<p> MapPath</p>
<p>MapPath method relative path into physical path on the server</p>
<p>Grammar<br />
Server.MapPath (Path)<br />
Parameter</p>
<p>Path</p>
<p>Relative path. This path is &#8220;/&#8221; or &#8220;\&#8221; at the beginning of the path, if this path is not &#8220;\&#8221;, then the method will return MapPath based on the current directory path.</p>
<p>Explain</p>
<p>MapPath method can not check path existence under this server. MapPath conversion path because this path regardless of whether the time is in existence under this server.</p>
<p>You can use it to be a relative path into a physical path, and then in various operations under this path.</p>
<p>Example</p>
<p>In the following example, data.txt file exists C: \ Inetpub \ Wwwroot \ Script directory, and a test.asp file includes the following code. C: \ Inetpub \ Wwwroot is the server&#8217;s home directory.</p>
<p>The following example, the first using the environment variable &#8220;PATH_INFO&#8221; get the physical path of the current file.</p>
<p>Here is Script code:<br />
&lt;% = Server.mappath (Request.ServerVariables (&#8220;PATH_INFO &#8220;))%&gt;<br />
Show as:</p>
<p>c: \ inetpub \ wwwroot \ script \ test.asp</p>
<p>Because the example below there is no path parameter to &#8220;/&#8221; at the beginning, so it is a transformation of the current directory, asp file is placed in C: \ Inetpub \ Wwwroot \ Script in. The following is the content of scripts:<br />
&lt;% = Server.mappath (&#8220;data.txt&#8221;)%&gt;</p>
<p>&lt;% = Server.mappath (&#8220;script / data.txt&#8221;)%&gt;<br />
Show as:<br />
c: \ inetpub \ wwwroot \ script \ data.txt</p>
<p>c: \ inetpub \ wwwroot \ script \ script \ data.txt<br />
The following are two examples of a &#8220;/&#8221; at the beginning of the. The following is the content of scripts:<br />
&lt;% = Server.mappath (&#8220;\ script&#8221;)%&gt;<br />
Show as:<br />
c: \ inetpub \ wwwroot \ script \ data.txt</p>
<p>c: \ inetpub \ wwwroot \ script<br />
Direct use of &#8220;/&#8221; or &#8220;\&#8221; will be the server&#8217;s home directory:<br />
&lt;% = Server.mappath (&#8220;\&#8221;)%&gt;<br />
Show as:<br />
c: \ inetpub \ wwwroot</p>
<p>c: \ inetpub \ wwwroot<br />
Transfer</p>
<p>transfer method will a asp file is executed all the information to another person asp file.</p>
<p>Grammar<br />
Server.Transfer (path)<br />
Parameter</p>
<p>Path</p>
<p>Will receive information asp file.</p>
<p>Points</p>
<p>When you call Server.Transfer, all built-in objects of the status information will be included in the transfer into. This means that all stored in Session or Application information will be sent in, and that all current information will be requested to receive information asp file to accept.</p>
<p>Example</p>
<p>The following example demonstrates file transfer from one asp to another asp file examples!<br />
ASP1</p>
<p>&lt;% Dim sessvar1 Response.Write Session.SessionID<br />
Response.Write (&#8220;&#8221;)<br />
Response.Write (&#8220;I am going to ASP2&#8243;)<br />
Server.Transfer (&#8220;/ Myasps/ASP2.asp&#8221;)<br />
%&gt;</p>
<p>ASP2<br />
&lt;% Response.Write Session.SessionID%&gt;<br />
URLEncode</p>
<p>URLEncode method can URL encode the specified string.</p>
<p>Grammar<br />
Server.URLEncode (string)<br />
Parameter</p>
<p>string specifies a string conversion</p>
<p>Example</p>
<p>Here is the code:<br />
&lt;% Respones.Write (Server.URLEncode (&#8220;<a href="http://www.microsoft.com&quot;))%/">http://www.microsoft.com&#8221;))%</a>&gt;<br />
Show as:</p>
<p>http% 3A% 2F% 2Fwww% 2Emicrosoft% 2Ecom</p>
<p>Properties: ScriptTimeout</p>
<p>ScriptTimeout attribute specifies a procedure for the maximum running time.</p>
<p>Grammar<br />
Server.ScriptTimeout = NumSeconds<br />
Parameter</p>
<p>NumSeconds</p>
<p>Provides the largest program run time (in seconds). The default value is 90 seconds</p>
<p>Remarks</p>
<p>A default value will be able to Scritpt Timeout property to set off ASPScriptTimeOUT or Web server on the Web sertvic. In the process, ScriptTimeout value of the property can not be less than the default value. Give you an example, if NumSeconds we set to 10 seconds, while the default value is 90 seconds, then the program will stop in 90 seconds later, not 10 seconds later. Similarly, if we set ScriptTimeout value of 100 seconds, then the program will stop at 100 seconds rather than 90 seconds.</p>
<p>Example</p>
<p>In the following cases the program will be set to 100 seconds after the automatic stay.<br />
&lt;% Server.ScriptTimeout = 100%&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyahoo.net/201008/comprehensive-analysis-of-the-server-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP Basics Tutorial: ASP loophole block</title>
		<link>http://www.joyahoo.net/201008/asp-basics-tutorial-asp-loophole-block/</link>
		<comments>http://www.joyahoo.net/201008/asp-basics-tutorial-asp-loophole-block/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 03:05:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Asp]]></category>

		<guid isPermaLink="false">http://www.joyahoo.net/?p=643</guid>
		<description><![CDATA[  Whether you believe it or not, by asp, may be able to easily invade web server, file server, theft, capture web database system user password, and even malicious delete files on the server until the damage caused by the system, these decisions non-sensational, and have indeed occurred, this will ...]]></description>
			<content:encoded><![CDATA[<p>  Whether you believe it or not, by asp, may be able to easily invade web server, file server, theft, capture web database system user password, and even malicious delete files on the server until the damage caused by the system, these decisions non-sensational, and have indeed occurred, this will reveal the asp you 11 loopholes, and some precautionary advice.<span id="more-643"></span><br />
     When the last:: $ DATA vulnerability was discovered and released the next day, I have examined the use of asp was most domestic sites, which are present more than 99 percent can see the source code of the problem, the day I even Microsoft&#8217;s site grabbed the search.asp source code of this file. Perhaps you will find that the source code and no right, if you think so as the webmaster of the wrong. For example, if the landing site asp programmer to write code directly in the asp, so once the source is found, others can easily access the pages should not be seen, I have used this method to become a toll free Site members (we can do expose me oh!), and many connections to the database user name and password are also directly written in asp, the event was found, if your database to allow remote access and there is no fortification, then quite dangerous. In some developed bbs with asp program, often using access mdb database, mdb stock up if the path was informed that the database is likely to be downloading, plus the password if the database contains no encryption, it is very dangerous , and obtain the password of the person who intends to carry out sabotage, he only needs to login as admin to delete all the bbs in the post, you&#8217;d see enough of. Here are some of the loopholes have been identified, I hope you alert one, through experiments we found, win95 + pws run ASP program, just simply in the browser address bar asp file name to add a decimal point after the ASP program on will be downloaded. IIS3 have the same problem, if you currently still using IIS3 must test.</p>
<p>     Second, iis2, iis3, iis4 is a well-known loophole:: $ DATA, through its use of the view source or netscape ie direct access to the asp file can easily see the asp code. win98 + pws4 the loophole does not exist.</p>
<p>      What are the causes of this terrible loophole? Traced is unique to Windows NT file system doing strange. A little common sense knows that the NT provides a completely different from the FAT file system: NTFS, this is known as new technology makes the NT file system technology with a high security mechanism, but precisely because It generated a lot of hidden dangers headache. You may not know, NTFS support is included in a file of multiple data streams, and this contains all the elements of the master data stream is called &#8220;DATA&#8221;, which makes the browser to directly access the NTFS system, this feature is easily capture in the file script as possible. However, a direct result of:: $ DATA is due to IIS when parsing the file name out of a problem, it is not a good standard file name.</p>
<p>    How do we solve this problem? There are several ways:</p>
<p>a, is. asp files stored in the directory is set to unreadable (ASP can be carried out), so html, css and other files can not be placed in this directory, otherwise they will not be here.</p>
<p>b, is to install Microsoft patches available to download at the following address (note the different systems for different patches):</p>
<p>The patch is against IIS3, Intel platform</p>
<p><a href="ftp://ftp.microsoft.com/bussys/iis/iis-public/fixes/cht/security/iis3-datafix/iis3fixi.exe">ftp.microsoft.com/bussys/iis/iis-public/fixes/cht/security/iis3-datafix/iis3fixi.exe</a></p>
<p>The patch is against IIS3, Intel platform</p>
<p><a href="ftp://ftp.microsoft.com/bussys/iis/iis-public/fixes/cht/security/iis3-datafix/iis3fixa.exe">ftp.microsoft.com/bussys/iis/iis-public/fixes/cht/security/iis3-datafix/iis3fixa.exe</a></p>
<p>The patch is for IIS4, Alpha platform</p>
<p><a href="ftp://ftp.microsoft.com/bussys/iis/iis-public/fixes/cht/security/iis4-datafix/iis4fixi.exe">ftp.microsoft.com/bussys/iis/iis-public/fixes/cht/security/iis4-datafix/iis4fixi.exe</a></p>
<p>The patch is for IIS4, Alpha platform</p>
<p><a href="ftp://ftp.microsoft.com/bussys/iis/iis-public/fixes/cht/security/iis4-datafix/iis4fixa.exe">ftp.microsoft.com/bussys/iis/iis-public/fixes/cht/security/iis4-datafix/iis4fixa.exe</a></p>
<p>c, is installed on the server ie4.01sp1, this is valid, the author did not specifically tried.</p>
<p>d, deposit the author&#8217;s personal views pure, to install the English version of NT, but do not use the Chinese version of reason can not tell, but according to practical experience in the English version of NT bug less than the Chinese version, which friends to know if cause 10 million to tell me.</p>
<p>      3. To support a free home page space, and ASP hosting service server problems</p>
<p>      1, ASP code on the server is likely to be other people who have illegal access asp permission.</p>
<p>Give a very simple example, in Microsoft&#8217;s ASP1.0 there is a routine. Asp file designed to view the other. Asp source code file, the file is ASPSamp / Samples / code.asp. If someone upload this process servers, and server-side without any precautions, he could easily see other people&#8217;s programs.</p>
<p>For example:</p>
<p>code.asp? source = / directory / file.asp<br />
       2, use ACCESS mdb database may be downloaded asp general competence in the provision of a free home page server can not set the DSN to provide services on behalf of, the asp database used by the program are usually limited to the use of mdb database, and the mdb far end of the database location is the use of our period mentioned in the 14th over of the DSN-less method specified directly in the asp, as follows:</p>
<p>&lt;% Connstr = &#8220;DBQ =&#8221; + server.mappath (&#8220;database / source.mdb &#8220;)+&#8221;; DefaultDir =; DRIVER = (Microsoft Access Driver (*. mdb)); DriverId = 25; FIL = MS Access; ImplicitCommitSync = Yes; MaxBufferSize = 512; MaxScanRows = 8; PageTimeout = 5; SafeTransactions = 0; Threads = 3; UserCommitSync = Yes; &#8220;%&gt;<br />
 </p>
<p>       As previously stated, in this case is likely to be another mdb database download, resulting in the disclosure of such password.</p>
<p>       Therefore, as a webmaster should take certain measures, like the program is strictly prohibited code.asp (seems to be very difficult, but you can periodically retrieve the characteristics of the code), limit mdb downloads.</p>
<p>       3, from the threat of powerful filesystemobject components</p>
<p>       IIS3, IIS4 the ASP file operations can be achieved through filesystemobject, including reading and writing text file directory operations, file rename or delete the copy, but the powerful also left a very dangerous &#8220;backdoor.&#8221; Tampering with the use filesystemobjet download any files on the fat partition. Even the ntfs partition, if the authority does not set well, it would also be able to destroy, believe you may suffer from a &#8220;disaster.&#8221; Unfortunately, many webmaster know so that web server up and running, rarely carried out ntfs permissions, while the NT directory permissions of the default settings chosen to secure another terrible low. Therefore, if you are Webmaster, strongly suggest that you pay close attention of the server settings, try to build web directory partition in ntfs, directory not set everyone full control, even a member of the administrators group generally no need full control, as long as read, change the permissions enough.</p>
<p>     4, ASP applications may face a number of Internet attacks in the past to write the message on the CGI or BBS is the customer of the input message into a variable, then put the variable into the HTML files to display messages, so customers text input To display the HTML file must comply with HTML standards, and CGI programs in general have joined a specific HTML language. When a customer input, insert the HTML file, that is also inserted into the head and tail HTML statement, such as:</p>
<p>&lt;Font&gt; customer input variables &lt;/ font&gt; However, if the HTML tags before and after to the spacious screen, and you can do a lot of things.</p>
<p>Marked as input:<br />
&lt;/ Font&gt; HTML standards compliance statement &lt;font&gt; after the &lt;font&gt; is used to spacious screen CGI used in the HTML statement. Inserted into the HTML file inside becomes:<br />
&lt;Font&gt; &lt;/ font&gt; HTML standards compliance statement &lt;font&gt; &lt;/ font&gt; as a feature, so write a javascript death cycle becomes very easy, as long as the input box:<br />
&lt;A href = &#8220;URL&#8221; onMouseover = &#8220;while (1) (window.close (\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&#8217;)}&#8221;&gt; or &lt;a herf = &#8220;URL&#8221; onMousever = &#8220;while (ture ) (window.close (\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&#8217;)}&#8221;&gt;<br />
      It will allow other customers to view the message browser die because death cycle. ASP development of the program is also possible that problem, so when you write a similar program O&#8217;clock Yong asp should do well on this type of operation the precautions, such as writing a program can determine the client and inputted into a shield out all of HTML, Javascript Yu Ju</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyahoo.net/201008/asp-basics-tutorial-asp-loophole-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS  more difficult than form?</title>
		<link>http://www.joyahoo.net/201008/css-more-difficult-than-form/</link>
		<comments>http://www.joyahoo.net/201008/css-more-difficult-than-form/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 08:24:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.joyahoo.net/?p=641</guid>
		<description><![CDATA[CSS layout is being promoted to the voice of &#8220;the advantages of the layout table,&#8221; the voice of the coverage. A myth that CSS is hard to learn. In fact, CSS is not hard than other web technologies. The problem is: the form has been designed for very experienced web ...]]></description>
			<content:encoded><![CDATA[<p>CSS layout is being promoted to the voice of &#8220;the advantages of the layout table,&#8221; the voice of the coverage. A myth that CSS is hard to learn. In fact, CSS is not hard than other web technologies. The problem is: the form has been designed for very experienced web designers have to give up their way of thinking to switch to CSS.<span id="more-641"></span></p>
<p>I have a table, the layout of many years, when I first started using CSS layout, I also encountered a problem. &#8220;Form and more simple Yeah,&#8221; I want to. However, it was only because I have are used to form, I know how to manipulate them. Any change, even a little bit will make me feel trouble, not to mention such a drastic change.</p>
<p>Recalls the first time I learn to use table layout, there are a lot of the same problems plague me. Think back to those rowspans, colspans and blank GIF image, is fair to say that two distribution methods, and use some form layout more difficult.</p>
<p>Another old-fashioned view is: CSS design page (bytes) is very large, large than the form design page. The reason is: Because you all the style of the site are in a file, when a user visits a page that contains the site&#8217;s style sheets style need to download, so the page is very great.</p>
<p>Then why do you want to have all the styles in a CSS file? No limit you can only use a CSS file, you can as a part of the section of the details of the style of a separate sub style sheet file. In my experience, from simple brochure-type sites to large database-driven, multi-functional system website, I have never been used only a single style sheet file, the code does not have a home page design and more than form. That table, tr, td tags occupy a large space, it immediately into action, with the CSS layout methods to slash your file size down.</p>
<p>When you use table layout, you have lost their semantic labels. standard method of distribution of the separation of web content and the presentation layer will bring huge benefits. When you lock your Form design, if you need to change it, you must find this page, and then analyze the table structure, then a page changes, while the CSS file can simply change the design of the site. With CSS you do not consider device-independent nature, without regard to the user to choose their own style.</p>
<p>I also heard that a form of &#8220;good&#8221;: design forms. But the forms can be ordered by any method of the Table. To Netscape4? I have never heard of such an old browser support is a reason. Most mainstream browsers are far greater than the interests of the minority does not support the style sheet with the browser of the user&#8217;s interests (not speak of CSS also supports plain text).</p>
<p>Those &#8220;super table&#8221; sum up the views of supporters is this: &#8220;form more easily.&#8221; This is nonsense! If you are satisfied with a less efficient way, which as you can. If you want to break out, to make page content more common, easy to use, even less code, try to change it. Of course, if you are a new learning web design from scratch, you will not have these problems.</p>
<p>&#8220;Car does not simply push down&#8221;, &#8220;This is merely a tool designer toolbox.&#8221; This is some discussion of the viewpoints. Table layout as the old-fashioned wooden handle a screwdriver, you can still use it to get into some wall. I prefer to use the electric screwdriver, CSS layout is more efficient, will not let my hand and then blisters.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyahoo.net/201008/css-more-difficult-than-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Standards Jianzhan Tutorial 12 &#8211; Check and Common Errors</title>
		<link>http://www.joyahoo.net/201008/web-standards-jianzhan-tutorial-12-check-and-common-errors/</link>
		<comments>http://www.joyahoo.net/201008/web-standards-jianzhan-tutorial-12-check-and-common-errors/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 08:23:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.joyahoo.net/?p=639</guid>
		<description><![CDATA[We strive to learn to use XHTML + CSS to redesign our site. So how do we know to produce their own web page that really meet the standard? W3C and some volunteers site provides online verification procedures, to help us check whether the page is standard, and provides a ...]]></description>
			<content:encoded><![CDATA[<p>We strive to learn to use XHTML + CSS to redesign our site. So how do we know to produce their own web page that really meet the standard? W3C and some volunteers site provides online verification procedures, to help us check whether the page is standard, and provides a correct mistakes of help information. The check is very useful, is the first step I to do debugging page.<span id="more-639"></span></p>
<p>1.XHTML check<br />
Check website: <a href="http://validator.w3.org/">http://validator.w3.org/</a><br />
Check mode: check URL, file upload validation<br />
Verification successful, will display &#8220;This Page Is Valid XHTML 1.0 Transitional!&#8221;, Figure:</p>
<p> <br />
Validation fails, will display more options and check the error message, as shown:</p>
<p> <br />
General Select &#8220;Show Source&#8221; and &#8220;Verbose Output&#8221; can help you find the line where the error code and error reason.</p>
<p>XHTML validation error causes common table<br />
No DOCTYPE Found! Falling Back to HTML 4.01 Transitional &#8211; undefined DOCTYPE.<br />
No Character Encoding Found! Falling back to UTF-8 .&#8211; undefined language encoding.<br />
end tag for &#8220;img&#8221; omitted, but OMITTAG NO was specified &#8211; image tag does not add &#8220;/&#8221; Close.<br />
an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified &#8211; attribute value must be in quotes.<br />
element &#8220;DIV&#8221; undefined &#8212; DIV tag can not use capital to lowercase div.<br />
required attribute &#8220;alt&#8221; not specified &#8212; need to add alt image attribute.<br />
required attribute &#8220;type&#8221; not specified &#8212; JS or CSS tag missed call type attribute.<br />
Far the most common mistakes is one case of label problems. Often these errors are related, such as forgetting one &lt;/ li&gt; other &lt;li&gt; label will error, so do not be afraid to see a bunch of mistakes, usually to solve an error, other errors are also gone. If your page through XHTML1.0 validation, so you can place an icon on the page: code:</p>
<p>&lt;p&gt; &lt;a href=&#8221;<a href="http://validator.w3.org/check/referer">http://validator.w3.org/check/referer</a>&#8220;&gt; &lt;img src = &#8220;<a href="http://www.w3.org/Icons/valid-xhtml10">http://www.w3.org/Icons/valid-xhtml10</a>&#8221; alt = &#8220;Valid XHTML 1.0 ! &#8220;height =&#8221; 31 &#8220;width =&#8221; 88 &#8220;/&gt; &lt;/ a&gt; &lt;/ p&gt;<br />
2.CSS2 check<br />
Check Website: <a href="http://jigsaw.w3.org/css-validator/">http://jigsaw.w3.org/css-validator/</a><br />
Check mode: check URL, file upload verification, validation code directly into the paste<br />
Verification successful, will show &#8220;Congratulations, this document has been through the style sheet check!&#8221;, Hoho, verify information to support the Chinese Oh. Figure:</p>
<p> <br />
Validation fails, will show two types of errors: errors and warnings. Error that must be modified, otherwise can not verify; warned that the code is not W3C has recommended that the proposed changes.</p>
<p>Causes of common errors in CSS2 validation table<br />
(Error) Invalid number: color909090 is not a color value: 909090 &#8212; hexadecimal color value to add &#8220;#&#8221; number, that is # 909 090<br />
(Error) Invalid number: margin-topUnknown dimension: 6pixels &#8212; pixels is not a unit value, the correct wording 6px<br />
(Error) Attribute scrollbar-face-color does not exist: # eeeeee &#8212; scroll bar color is non-standard definition of the properties<br />
(Error) value cursorhand does not exist: hand is a non-standard property value, modify the cursor: pointer<br />
(Warning) Line: 0 font-family: suggest that you specify a type of family Bureau as the last option &#8211; W3C recommendation defined font when the font type of the last to end one, for example, &#8220;sans-serif&#8221;, to ensure operation in different systems, web fonts can be displayed.<br />
(Warning) Line: 0 can&#8217;t find the warning message for otherprofile &#8211; that there are non-standard attributes in the code or value, calibration procedures can not determine and provide the appropriate warning information.<br />
Similarly, by inspection, you can check by placing a CSS icon, the code is as follows:</p>
<p>&lt;p&gt; &lt;a href=&#8221;<a href="http://jigsaw.w3.org/css-validator/">http://jigsaw.w3.org/css-validator/</a>&#8220;&gt; &lt;img style = &#8220;border: 0; width: 88px; height: 31px&#8221; src = &#8220;<a href="http://jigsaw/">http://jigsaw</a>. w3.org/css-validator/images/vcss &#8220;alt =&#8221; Valid CSS! &#8220;/&gt; &lt;/ a&gt; &lt;/ p&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyahoo.net/201008/web-standards-jianzhan-tutorial-12-check-and-common-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web standards Jianzhan Tutorial 10 &#8211; Adaptive Height</title>
		<link>http://www.joyahoo.net/201008/web-standards-jianzhan-tutorial-10-adaptive-height/</link>
		<comments>http://www.joyahoo.net/201008/web-standards-jianzhan-tutorial-10-adaptive-height/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 08:21:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.joyahoo.net/?p=636</guid>
		<description><![CDATA[If we want the final layout in three additional line footer, put the copyright information and the like. Experience must be aligned on the bottom of the problem 3. In the table layout, we form with large tables nested small way, you can easily align 3; and use div layouts, ...]]></description>
			<content:encoded><![CDATA[<p>If we want the final layout in three additional line footer, put the copyright information and the like. Experience must be aligned on the bottom of the problem 3. In the table layout, we form with large tables nested small way, you can easily align 3; and use div layouts, three independent distributed, the content of high and low, it is difficult to align. In fact, we can nested div, the three into a DIV in the bottom of the alignment done. Here is an example implementation (box simulating a white background page):<span id="more-636"></span></p>
<p>Body<br />
Here is # header (MARGIN: 0px; BORDER: 0px; BACKGROUND: # ccd2de; WIDTH: 530px; HEIGHT: 60px;)<br />
Here is the # mainbox (MARGIN: 0px; WIDTH: 530px; BACKGROUND: # FFF;) contains a # menu, # sidebar and # content<br />
Here is the # menu (FLOAT: right; MARGIN: 2px 0px 2px 0px; PADDING: 0px 0px 0px 0px; WIDTH: 400px; BACKGROUND: # ccd2de;)<br />
Here is the # sidebar (FLOAT: left; MARGIN: 2px 2px 0px 0px; PADDING: 0px; BACKGROUND: # F2F3F7; WIDTH: 170px;), the background color using a # main background color</p>
<p>Here is the # content (FLOAT: right; MARGIN: 1px 0px 2px 0px; PADDING: 0px; WIDTH: 400px; BACKGROUND: # E0EFDE;)</p>
<p>This is the main content, automatically adapt to a high degree based on content</p>
<p>This is the main content, automatically adapt to a high degree based on content</p>
<p>This is the main content, automatically adapt to a high degree based on content</p>
<p>Here is the # footer (CLEAR: both; MARGIN: 0px 0px 0px 0px; PADDING: 5px 0px 5px 0px; BACKGROUND: # ccd2de; HEIGHT: 40px; WIDTH: 530px;).<br />
The main page of this example code:</p>
<p>&lt;div id=&#8221;header&#8221;&gt; &lt;/ div&gt;<br />
&lt;div id=&#8221;mainbox&#8221;&gt;<br />
&lt;div id=&#8221;menu&#8221;&gt; &lt;/ div&gt;<br />
&lt;div id=&#8221;sidebar&#8221;&gt; &lt;/ div&gt;<br />
&lt;div id=&#8221;content&#8221;&gt; &lt;/ div&gt;<br />
&lt;/ Div&gt;<br />
&lt;div id=&#8221;footer&#8221;&gt; &lt;/ div&gt;<br />
Specific style sheets are written in the appropriate Forum in the. Focus # mainbox layer nested # menu, # sidebar and # content of three layers. When increasing the content of # content, # content&#8217;s height will be increased, while the height of # mainbox distraction, # footer layer is automatically down. This achieved a high degree of adaptive.</p>
<p>Also worth noting is: # menu and # content are floating on the page right &#8220;FLOAT: right;&#8221;, # sidebar is floating in the # menu layer of the left &#8220;FLOAT: left;&#8221;, which is positioning the floating method can also be used absolute positioning to achieve such results.</p>
<p>There is another issue of this method is that the sidebar # sidebar&#8217;s background can not be 100 percent. The general solution is to use the body&#8217;s background color to fill full. (Can not use # mainbox the background color, because in Mozilla and other browsers # mainbox the background color of the failure.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joyahoo.net/201008/web-standards-jianzhan-tutorial-10-adaptive-height/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
