|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
想法是和程序员的想法不一样的.至于为什么.大家去想一想.跟心理学有关的代码分别<%@PageInherits="MyCodeBehind"Src="c2.vb"%>
Thereisanicesectioninthequickstartdocsonthistopicalso.Clickheretoreaduponit!
Hereisthecode
Thisexampleusesthefollowing
MS-SQLServer7.0database
StoredProcedure
Component1a.aspx(HTMLFile)
c2.vb
Component1a.aspx(ThePagethatistheUI)
<%@PageInherits="MyCodeBehind"Src="c2.vb"Debug="True"trace="True"%>
<scriptlanguage="VB"runat="server">
SubPage_Load(SenderAsObject,EAsEventArgs)
response.write("SMILE!!!Ilovelearningnewthingseveryday")
EndSub
</script>
<html>
<head>
<title>ComponentPage1</title>
</head>
<body>
<tableborder=0cellpadding=3cellspacing=3>
<trbgcolor="#CCCCCC">
<td>
<fontface="Arial,Helv"size="-1">
Pleasefilloutthisformtocreateanewuserprofileforyour
CompanysComponent.
<br>
Oncethisinformationisgatheredyouwillnotneedtoenteritagainandyouwillbeabletoupdateanytime.
<p>
Usethebuttonatthebottomofthispagetocontinuewhenyouarefinished.
<br>
</font>
</td>
</tr>
</table>
<fontsize="+1"><b><fontcolor="#ff0000">*=RequiredFields</b><br>
<formmethod="Post"name="form1"runat="server">
<table><tr>
<tdalign=right>
<asp:Labelid="Label1"Text="CompanyName"Font-Name="Verdana"Font-Size="10pt"Width="200px"BorderStyle="solid"BorderColor="#cccccc"runat="server"/>
</td>
<td>
<asp:TextBoxid="CompanyName"size="30"runat="server"/>
<asp:RequiredFieldValidatorControlToValidate="CompanyName"Display="Dynamic"errormessage="Youmustenteryourname!"runat=server/>
</td>
</tr>
<tr>
<tdalign=right>
<asp:Labelid="Label2"Text="CompanyURL"Font-Name="Verdana"Font-Size="10pt"Width="200px"BorderStyle="solid"BorderColor="#cccccc"runat="server"/>
</td>
<td>
<asp:TextBoxid="CompanyURL"size="30"runat="server"/>
</td>
</tr>
</font>
<tr>
<tdalign=right>
<asp:Labelid="Label3"Text="ContactEmail"Font-Name="Verdana"Font-Size="10pt"Width="200px"BorderStyle="solid"BorderColor="#cccccc"runat="server"/>
</td>
<td>
<asp:TextBoxid="EmailAddress"size="30"runat="server"maintainstate="false"/>
<asp:RegularExpressionValidatorControlToValidate="EmailAddress"ValidationExpression="[w-]+@[w-]+.(com|net|org|edu|mil)"Display="Dynamic"Font-Name="verdana"Font-Size="9pt"ErrorMessage="Mustuseavalidemailaddress."runat="server"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidatorControlToValidate="EmailAddress"Display="dynamic"Font-Name="verdana"Font-Size="9pt"ErrorMessage="Emailmustnotbeleftblank."runat=server></asp:RequiredFieldValidator></td>
</tr>
</table>
<tableborder=0bgcolor="#CCCCCC"cellpadding=3cellspacing=3width="490">
<tr>
<tdwidth="100%"colspan="2">
<asp:Buttonid="Button1"Text="CreateProfile"OnClick="Button1_Click"Runat="server"/>
</td>
</tr>
</table>
</form>
</body>
</html>
c2.vbFile(ThisFileContainsthebusinesslogicthatisinheritedjustlikeacompiledDLL
OptionStrictOff
ImportsSystem
ImportsSystem.DateTime
ImportsSystem.Globalization
ImportsSystem.Data
ImportsSystem.Data.SQL
ImportsSystem.Web.UI
Imp</p>由于ASP还是一种Script语言所没除了大量使用组件外,没有办法提高其工作效率。它必须面对即时编绎的时间考验,同时我们还不知其背后的组件会是一个什么样的状况; |
|