首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

get传值 ajax再次回发 取值为空有关问题

2012-04-13 
get传值 ajax再次回发 取值为空问题namespace uiniRMS.Admin{public partial class IndexDataNewCreate :

get传值 ajax再次回发 取值为空问题
namespace uiniRMS.Admin
{
  public partial class IndexDataNewCreate : System.Web.UI.Page
  {
  private string id;
  {
  //id =Request.QueryString.Get("id");
  id = "65634";
  if (!IsPostBack)
  {
  Bind(id);
  BindTree();
  }
  }

  protected void Bind(string SID)
  {
  articlesInfo = articlesMan.Get(int.Parse(SID));
  string tempFontContent = Request["tempfontcontent"];
  if (!string.IsNullOrEmpty(tempFontContent))
  {
  indexDataInfo = indexDataMan.Get(tempFontContent);
  string data = indexDataInfo.CategoryID + " " + indexDataInfo.Description + "#";
  Response.Write(data);
  }
  }

上面的问题,就是id取值问题,我做测试时候直接赋值 id = "65634"; 整个测试没有一点问题。

问题来了---> 通过get传值 id =Request.QueryString.Get("id");第一次可以取到,可是当我页面通过hover事件post到后台之后再次绑定,id为null了,请高手指教!!我可以通过何种方式解决?


[解决办法]

你拿隐藏域装起来得了 别传了

热点排行