大作业源代码Word格式.docx
- 文档编号:22437889
- 上传时间:2023-02-04
- 格式:DOCX
- 页数:16
- 大小:18.16KB
大作业源代码Word格式.docx
《大作业源代码Word格式.docx》由会员分享,可在线阅读,更多相关《大作业源代码Word格式.docx(16页珍藏版)》请在冰豆网上搜索。
mydatagrid.datasource=newdataview(ds.tables(0))
mydatagrid.databind()
ifmydatagrid.items.count=0then
statues.style("
color"
)="
red"
statues.text="
登录失败,请检查用户名和密码!
conn.close()
else
dimusernameasstring=ds.tables(0).rows(0).item
(1)
dimuserheadasstring=ds.tables(0).rows(0).item(3)
session("
username"
)=username
userhead"
)=userhead
response.redirect("
bbs.aspx"
endif
/script>
!
--#includevirtual="
head.inc"
-->
divalign="
center"
>
<
table>
tr>
td>
imgsrc="
image\LINE-TOP.gif"
/td>
/tr>
/table>
TABLEalign=center>
TR>
TDvalign=top>
tablewidth=555align=rightborder=0bgcolor=white>
--BBS文章-->
tdbgcolor=#94CBFFstyle="
font-size:
10pt"
&
nbsp;
image\forum.gif"
IFRAMEmarginWidth=0marginHeight=0src="
subjectlist.aspx"
frameBorder=0scrolling=nowidth=550height=150>
/iframe>
/TD>
tdvalign=topbackground="
image\line.gif"
style="
background-repeat:
repeat-y"
width=2>
tableborder="
0"
9pt"
align=leftCELLPADDING=0CELLSPACING=0>
<
tdbgcolor=#94CBFFheight=20style="
9pt;
text-decoration:
underline"
align=center>
在线论坛<
formid="
Form1"
method="
post"
runat="
server"
>
--bbs登录-->
帐号:
asp:
textboxid="
size=10style="
border:
1pxsolidblack"
/>
br>
密码:
password"
textmode="
buttonid="
submit"
text="
登录"
onclick="
checkuser"
&
submit2"
window.open('
register.aspx'
注册<
/button>
BR>
labelid=statuesrunat=server/>
--网站调查-->
;
align=centerheight=20>
网站调查<
panelid=ssrunat=server>
vote.aspx"
frameBorder=0scrolling=nowidth=200height=160>
/asp:
panel>
--下载-->
/TR>
/TABLE>
--验证-->
RequiredFieldValidator
ID="
Requiredfieldvalidator1"
ControlToValidate="
Display=None
InitialValue="
ErrorMessage="
用户名必须填写!
Runat=server>
RequiredFieldValidator>
REVPASSWORD"
密码必须填写!
ValidationSummary
ValidationSummary1"
Runat=server
EnableViewState=False
ShowSummary=False
HeaderText="
用户登录失败,请注意以下规则:
ShowMessageBox=True
Font-Name=verdana
Font-Size=9pt>
ValidationSummary>
datagridid="
mydatagrid"
runat=servervisible="
false"
/form>
foot.inc"
/div>
/body>
/html>
2论坛注册页面register.aspx的页面:
%@importnamespace="
%@PageLanguage="
%>
scriptlanguage=vbrunat=server>
dimiasinteger
ifnotispostbackthen
fori=1to34
dimsrcstrasstring
srcstr="
image\"
+i.tostring()+"
.gif"
imglist.Items.Add(newListItem("
"
))
imglist.items(i-1).value=srcstr
imglist.items(i-1).text="
imgsrc='
+srcstr+"
next
imglist.items(0).selected="
endif
subcheck_user(senderasobject,easeventargs)
ifpage.isvalidthen
dimmycommandasSqlcommand
dimcountnumasinteger
insertintouserinfo(username,headimg,userpassword)values('
+login_name.text+"
'
+imglist.selecteditem.value+"
+login_pass.text+"
mycommand=newSqlcommand(querystring,conn)
dimquerystring2asstring="
select*fromuserinfowhere(username='
+trim(login_name.text)+"
dimdsasdataset=newdataset
dimmycommand2asSqlDataAdapter=newSqlDataAdapter(querystring2,conn)
mycommand2.fill(ds)
ifmydatagrid.items.count<
0then
statues.style("
statues.text="
注册失败,此用户名已被注册,请重新选择一个用户名!
TRY
conn.open
CATCHSSASEXCEPTION
STATUES.TEXT=SS.MESSAGE
ENDTRY
'
TRY
mycommand.executenonquery()
注册成功,请直接进入!
CATCHDASEXCEPTION
STATUES.TEXT=D.MESSAGE
ENDTRY
conn.close()
endsub
html>
head>
metaname="
GENERATOR"
Content="
MicrosoftVisualStudio.NET7.0"
/head>
body>
formrunat="
tablewidth=600align=centerstyle="
border-collapse:
collapse"
border=1bordercolor=black>
tdcolspan=2bgcolor=#63309C>
image\ip.gif"
新用户注册<
用户名:
textboxstyle="
login_name"
MaxLength="
20"
TextMode="
SingleLine"
/>
登录密码:
login_pass"
6"
确认密码:
re_login_pass"
OICQ:
oicq"
12"
tdcolspan=2>
radiobuttonlistID="
imglist"
Runat="
RepeatDirection=HorizontalRepeatColumns=10/>
tralign=center>
buttonCommandName="
newuser_reg"
reg"
STYLE="
FONT-SIZE:
9PT"
Text="
开始注册"
check_user"
labelid="
statues"
datagrid
id="
myDatagrid"
bordercolor="
black"
borderwidth="
1"
WIDTH="
760"
ALIGN="
gridlines="
both"
AutoGenerateColumns="
visible="
CompareValidator
CompareValidator1"
ControlToCompare="
Type=String
Operator=Equal
两次输入的密码不一致!
CompareValidator>
RegularExpressionValidator
oicqvalidator"
ValidationExpression="
[0-9]\d+"
OICQ号码必须为数字!
RegularExpressionValidator>
注册失败,请注意以下规则:
3论坛加入新帖页面:
system.data.sqlclient"
ifsession("
then
response.redirect("
bbs_login.aspx"
endif
subAddnew_Subject_Submit(senderasobject,easeventargs)
=============上传图片===============================
dimiasinteger
dimfinfoasstring
dimimgasstring
dimpostedfileashttppostedfile=request.files(I)
================================================
ifpostedfile.contentlength>
dimfilesplit()asstring=split(postedfile.filename,"
\"
dimfilenameasstring=filesplit(filesplit.length-1)
postedfile.saveas(server.mappath("
db\uploadfile"
)&
filename)
dimimgpathasstring="
db\uploadfile\"
filename
img="
+imgpath+"
border=0>
=======================================提交文本信息==
dimmycommandasSqlcommand
dimupdatestringasstring
dimsubjectstrasstring=subject.text
dimflageasstring="
subject"
dimdescriptionasstring=text1.text
dimusernameasstring=session("
dimuserheadasstring=session("
================格式转换======================
subjectstr=subjectstr.Replace("
amp;
lt;
subjectstr=subjectstr.Replace("
gt;
subjectstr=subjectstr.Replace(chr(32),"
’"
subjectstr=subjectstr.Replace(chr(13),"
subjectstr=subjectstr.Replace(chr(10),"
dimcontentstrasstring=content.text
contentstr=contentstr.Replace("
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 作业 源代码
![提示](https://static.bdocx.com/images/bang_tan.gif)