当前位置:首页 > 代码 > 正文

.net网站页面代码(net 网站开发)

admin 发布:2022-12-19 09:27 98


今天给各位分享.net网站页面代码的知识,其中也会对net 网站开发进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

求用C#写一个简单的ASP.NET网页代码,实现一个简单功能就好

html代码:

table id="TABLE1" border="0" cellpadding="0" cellspacing="0" style="width: 300px;

height: 95px" onclick="return TABLE1_onclick()"

tr

td style="width: 80px"

用户名:/td

td style="width: 220px"

asp:TextBox ID="txt_name" runat="server"/asp:TextBox/td

/tr

tr

td style="width: 80px"

密 码:/td

td style="width: 220px"

asp:TextBox ID="txt_pwd" runat="server" TextMode="Password"/asp:TextBox/td

/tr

tr

td colspan="2" style="text-align: center"

asp:Button ID="btn_clear" runat="server" OnClick="btn_clear_Click" Text="清 空" /

asp:Button ID="btn_submit" runat="server" OnClick="btn_submit_Click" Text="提 交" /

asp:Label ID="Label1" runat="server" Text="Label"/asp:Label/td

/tr

/table

.cs代码:

protected void Page_Load(object sender, EventArgs e)

{

}

protected void btn_clear_Click(object sender, EventArgs e)

{

txt_name.Text = "";

txt_pwd.Text = "";

}

protected void btn_submit_Click(object sender, EventArgs e)

{

if (txt_name.Text=="thpwin"txt_pwd.Text=="123")

{

Label1.Text = "成功!";

Label1.ForeColor = System.Drawing.Color.DarkGreen;

}

}

asp.net网页代码问题

把:iframe id="IFR" style="width:80%;height:350px" frameborder="0" scrolling="no" src="" onload="AutoHeight()"/iframe

改成:

iframe name="IFR" id="IFR" style="width:80%;height:350px" frameborder="0" scrolling="no" src="" onload="AutoHeight()"/iframe

如何用vb.net获得网页的源代码

Dim url As String=" 网址"

Dim httpReq As System.Net.HttpWebRequest

Dim httpResp As System.Net.HttpWebResponse

Dim httpURL As New System.Uri(url)

httpReq = CType(WebRequest.Create(httpURL), HttpWebRequest)

httpReq.Method = "GET"

httpResp = CType(httpReq.GetResponse(), HttpWebResponse)

httpReq.KeepAlive = False ' 获取或设置一个值,该值指示是否与

Internet资源建立持久连接。

Dim reader As StreamReader = _

New StreamReader(httpResp.GetResponseStream,

System.Text.Encoding.GetEncoding(-0))

Dim respHTML As String = reader.ReadToEnd() 'respHTML就是网页源代码

关于.net网站页面代码和net 网站开发的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/5961.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载