protected string GetDing(string ding, string id, string table)
{
return "<input name=" + table + id + " type=text id=" + table + id + " value=" + ding + " style='width:50px' /><a href='?id=" + id + "&abc=ding&table=" + table + "'><font color='red'>置顶</font></a>";
}Request.Form[Request.QueryString["table"] + Request.QueryString["id"]]这样为何取不到值?应该如何取?
{
return "<input name=" + table + id + " type=text id=" + table + id + " value=" + ding + " style='width:50px' /><a href='?id=" + id + "&abc=ding&table=" + table + "'><font color='red'>置顶</font></a>";
}Request.Form[Request.QueryString["table"] + Request.QueryString["id"]]这样为何取不到值?应该如何取?
不行啊,是不是哪里有错误?我用Request.Form[0]会报出空指针异常。
<input id="Text1" name="myText1" type="text" value="aaaaa" />c#代码
string a = (Request.Form["myText1"]).ToString();
注意用input中的name