日期:2014-05-17 浏览次数:20908 次
public class Driver
{
public int StrToInt32(string e)
{
if (!string.IsNullOrEmpty(e))
{
try
{
return Convert.ToInt32(e);
}
catch (Exception ex) { }
}
return 0;
}
public string GetUrlStr(string e)
{
if (!string.IsNullOrEmpty(Request.QueryString[e]))
return Request.QueryString[e];
return string.Empty;
}
}
public partial class index : System.Web.UI.Page
{
private Driver Driver = new Driver();
public string GetUrlStr(string e)
{
if (!string.IsNullOrEmpty(Request.QueryString[e]))
return Request.QueryString[e];
return string.Empty;
}
protected void Page_Load(object sender, EventArgs e)
{
userid= Driver.StrToInt32(GetUrlStr("userid"));
}
}
public partial class index : System.Web.UI.Page
{
private Driver Driver = new Driver();
public string GetUrlStr(string e)
{
if (!string.IsNullOrEmpty(Request.QueryString[e]))
return Request.QueryString[e];
return string.Empty;
}
protected void Page_Load(object sender, EventArgs e)
{
userid= Driver.StrToInt32(Driver.GetUrlStr("userid"));
}
}