日期:2014-05-18  浏览次数:20451 次

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了,请高手指教!!我可以通过何种方式解决?


------解决方案--------------------

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