有谁知道json吗,根据两个参数,到ashx里面去做处理,等到一下arraylist,把得到的arraylist循环的给页面上的textbox,想要模拟的例子 有谁知道json吗,根据两个参数,到ashx里面去做处理,等到一下arraylist,把得到的arraylist循环的给页面上的textbox,想要模拟的例子 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 得到 json = "[" + string.Join(",", RegUserNames) + "]",我要办他循环的给<input type="text" name="txtReg1"/> ,<input type="text" name="txtReg2"/>等等 public IList<TBWriterInfo> Findbyname(int page, int pagesize, string name, out int total) { total = 0; string stmtID = "TBWriterInfoGen-P_WriteList"; Hashtable ht = new Hashtable(); ht.Add("name", name); ht.Add("PageIndex", page - 1); ht.Add("PageSize", pagesize); ht.Add("total", total); IList<TBWriterInfo> result = Instance.QueryForList<TBWriterInfo>(stmtID, ht); total = Convert.ToInt32(ht["total"].ToString()); return result; }IList<TBWriterInfo> list = ITBW.Findbyname(page, myPage.PageSize, name, out total) foreach (TBWriterInfo s in list) { lblAchievement.Text = s.Achievement; lblName.Text = s.Name; ...... } 前台也很简单哦<div> <asp:TextBox ID="txtname" runat="server"></asp:TextBox> <asp:TextBox ID="txtsex" runat="server"></asp:TextBox> <asp:TextBox ID="txtclass" runat="server"></asp:TextBox> <asp:TextBox ID="txttel" runat="server"></asp:TextBox></div>这样的就可以在.cs文件中直接用ID.text=你所取到的数据 来展现在页面上,如:IList<TBWriterInfo> list = ITBW.Findbyname(page, myPage.PageSize, name, out total) foreach (TBWriterInfo s in list) { txtname.Text = s.name; txtsex.Text = s.sex; txtclass.Text=s.class; txttel.text=s.tel; } 大家看下 我这段代码 哪里错了 为什莫总是返回到else 页面 晚上12点???? .NET中Dropdownlist绑定多个空格问题~~~~ ASP.Net2.0中的SQLDataSource--狂汗!微软搞什么鬼呀,竟然这样设置默认值……还得我搞了一整天 问:关于win2003的iis不能访问.asp/aspx文件? 请教一个问题 ajax 获得ds.Tables[0].Rows[i].EXNM 值出错! 新手上路,ASP.NET应用移植问题,请各位高手帮忙.很急!!!!!!!!! 麻烦将如下c#代码翻译成vb代码 一个页面表现的简单问题 关于ASP.NET 数据源绑定问题 金融数字问题
public IList<TBWriterInfo> Findbyname(int page, int pagesize, string name, out int total)
{
total = 0;
string stmtID = "TBWriterInfoGen-P_WriteList";
Hashtable ht = new Hashtable();
ht.Add("name", name);
ht.Add("PageIndex", page - 1);
ht.Add("PageSize", pagesize);
ht.Add("total", total);
IList<TBWriterInfo> result = Instance.QueryForList<TBWriterInfo>(stmtID, ht);
total = Convert.ToInt32(ht["total"].ToString());
return result;
}IList<TBWriterInfo> list = ITBW.Findbyname(page, myPage.PageSize, name, out total)
foreach (TBWriterInfo s in list)
{
lblAchievement.Text = s.Achievement;
lblName.Text = s.Name;
...... }
<asp:TextBox ID="txtname" runat="server"></asp:TextBox>
<asp:TextBox ID="txtsex" runat="server"></asp:TextBox>
<asp:TextBox ID="txtclass" runat="server"></asp:TextBox>
<asp:TextBox ID="txttel" runat="server"></asp:TextBox>
</div>这样的就可以在.cs文件中直接用ID.text=你所取到的数据 来展现在页面上,如:IList<TBWriterInfo> list = ITBW.Findbyname(page, myPage.PageSize, name, out total)
foreach (TBWriterInfo s in list)
{
txtname.Text = s.name;
txtsex.Text = s.sex;
txtclass.Text=s.class;
txttel.text=s.tel;
}