一个自动生成序列的照片小程序(C#)100分。
我自己写的,有错,请大家调试过。
<%@ Page Language="C#"%>
<script Runat="Server">
void Button_Click(Object sender,EventArgs e)
{
string Photo_Number=txtPhoto_Number.Value;
int Photo_Number;
for(Photo_Number>0;Photo_Number<Photo_Number+33;Photo_Number++)
{
Response.Write("[IMG]http://www.psb.com.cn/news_images/dscf"+Photo_Number+".jpg[/IMG]"+"<br>");
}
}
</script>
<html>
<head><title>Photo_Number.aspx</title></head>
<body>
<form Runat="Server">
<asp:TextBox
ID="txtPhoto_Number"
Runat="Server"/>
<asp:Button
Text="提交"
OnClick="Button_Click"
Runat="Server"/>
</form>
</body>
</html>
错误提示:
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误信息: CS0117: “System.Web.UI.WebControls.TextBox”并不包含对“Value”的定义
源错误:
行 4: void Button_Click(Object sender,EventArgs e)
行 5: {
行 6: string Photo_Number=txtPhoto_Number.Value;
行 7: int Photo_Number;
行 8: for(Photo_Number>0;Photo_Number<Photo_Number+33;Photo_Number++)
源文件: C:\Inetpub\wwwroot\a\ps.aspx 行: 6