asp.net控制网站分辨率
控制网站分辨率 我们可以 用 frameset
虽然 asp.net不支持这个属性 但是功能是可以实现的
如 :
<frameset name="main" rows="105,*" frameborder="no" border="0" framespacing="0">
<frame src="xx.aspx" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
<frame src="yy.htm" name="contentFrame" scrolling="No" noresize="noresize" id="contentFrame" title="contentFrame" />
</frameset>
<noframes><body>
</body>
</noframes>
此页面 没有body
相关文档:
Web 是基于无状态的http协议,ASP.NET 为了保证控件在页面传送到服务器,再从服务器发回到页面的时保持之前的状态。
代码准备:
在aspx页面上添加一个listbox控件,和一个button服务器控件:
<
asp:ListBox runat
=
"
server
"
ID
=
"
lbViewState
"
></
asp ......
方案1:
/// <summary>
/// 传入URL返回网页的html代码
/// </summary>
/// <param name="Url">URL</param>
/// <returns></returns>
public static string getUrltoHtml(string Url)
{
errorMsg = "";
try
{
System.Net.WebRequest wReq = System.Net.WebReque ......
1. 打开新的窗口并传送参数:
传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
接收参数:
string a = Request.QueryString("id");
string b = Request.QueryString("id1");
2.为按钮添加对话框
Button1 ......
在c# / ASP.net中我们可以通过使用DataTime这个类来获取当前的时间。通过调用类中的各种方法我们可以获取不同的时间:如:日期(2008-09-04)、时间(12:12:12)、日期+时间(2008-09-04 12:11:10)等。
//获取日期+时间
DateTime.Now.ToString(); // 2008- ......