如何在aspx页面将repeater绑定的值临时给一个变量 <%string aa=DataBinder.Eval(Container.DataItem, "ID").ToString();好像不行 %> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你可以在cs页面定义 public string aa; 用JS取值,然后赋给一个全局变量 。你的需求没说清楚,是要将变量赋给后台的变量,还是前台页面中Js变量 要将变量赋给后台的变量当前上下文中不存在名称“Container” <label id="hotelid" runat="server">行 90: <%#DataBinder.Eval(Container.DataItem, "ID")%></label>行 91: <% string eel = DataBinder.Eval(Container.DataItem, "ID").ToString();%>行 92: </HeaderTemplate>行 93: <ItemTemplate> protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { DataRowView row = (DataRowView)e.Item.DataItem;//当前行的数据 实现取值 } } window.showModalDialog打开新窗口,不显示效果。 Page_Load 函数最后执行前台脚本函数?? ASP问题 FCKeditor界面修改 配置文件中无法识别的标记“Form” 为什么我创建 Web安装项目 的时候没有将我的DB数据库打包进去 在dataset中添加了记录,用adapter却添加不到数据库中 想查询记录条数,出错????? 如何用VS2003C#实现树型目录导航!! 在Gridview中添加新的linkbutton而不触发rowcommand事件 一个关于网站搜索的问题,就只剩下最后一步了,急等!! .net中access数据库的连接字符串怎么写?
行 90: <%#DataBinder.Eval(Container.DataItem, "ID")%></label>
行 91: <% string eel = DataBinder.Eval(Container.DataItem, "ID").ToString();%>
行 92: </HeaderTemplate>
行 93: <ItemTemplate>
protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
DataRowView row = (DataRowView)e.Item.DataItem;//当前行的数据
实现取值
}
}