模板列中控件实现window.open()并传参
来源:互联网 发布:js 文件进度 编辑:程序博客网 时间:2024/06/03 21:28
html
<asp:DataList ID="dl_Male" runat="server" RepeatDirection="Horizontal" RepeatColumns="5" DataKeyField="MemberID">
<ItemTemplate>
<div>
<li style="width:50px; height:50px">
<img runat="server" width="65" height="65" id="img_Female" style="border-style:solid; border-width:1px; border-color:#D1D0CC" src="Images/Default/DefaultImage.gif" alt="" />
</li>
<li>
<asp:HyperLink runat="server" ID="hl_NickName" Text='<%# Eval("NickName") %>' CssClass="index_datalistwinopen" ></asp:HyperLink>
</li>
</div>
</ItemTemplate>
</asp:DataList>
<ItemTemplate>
<div>
<li style="width:50px; height:50px">
<img runat="server" width="65" height="65" id="img_Female" style="border-style:solid; border-width:1px; border-color:#D1D0CC" src="Images/Default/DefaultImage.gif" alt="" />
</li>
<li>
<asp:HyperLink runat="server" ID="hl_NickName" Text='<%# Eval("NickName") %>' CssClass="index_datalistwinopen" ></asp:HyperLink>
</li>
</div>
</ItemTemplate>
</asp:DataList>
cs
for (int i = 0; i < dl_Male.Items.Count; i++)
{
int nMemberID = Convert.ToInt32(dl_Male.DataKeys[dl_Male.Items[i].ItemIndex].ToString());
HyperLink hl_MaleMember = (HyperLink)dl_Male.Items[i].FindControl("hl_NickName");
hl_MaleMember.Attributes.Add("onclick", "window.open ('Blog/BlogIndex.aspx?MemberID=" + nMemberID + "' , null, 'height=600, width=874, top=0, left=300,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no');");
}
{
int nMemberID = Convert.ToInt32(dl_Male.DataKeys[dl_Male.Items[i].ItemIndex].ToString());
HyperLink hl_MaleMember = (HyperLink)dl_Male.Items[i].FindControl("hl_NickName");
hl_MaleMember.Attributes.Add("onclick", "window.open ('Blog/BlogIndex.aspx?MemberID=" + nMemberID + "' , null, 'height=600, width=874, top=0, left=300,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no');");
}
- 模板列中控件实现window.open()并传参
- window.open()发action请求并传参
- window.open()发action请求并传参
- GridView控件中模板列CheckBox全选、反选、取消实现代码
- AJAX GridView中用window.open打开新窗口并传参数
- A网站跳转B网站并传值-----window.open
- 在Javascript 中实现window.open弹出窗口居中显示
- 在Javascript 中实现window.open弹出窗口居中显示
- 怎么触发DataGrid模板列中控件的事件
- 怎么触发DataGrid模板列中控件的事件?
- 如何设置UltraWebGrid中模板列中的控件状态
- Js取出Gridview中模板列控件ID
- GridView的模板列中判断控件所在行
- GridView控件中模板列CheckBox全选、反选、取消
- 获得GridView模板列中控件所在行
- javascript实现WEB打印(用window.open()实现).不用安装任何控件.(含代码)分享
- window.open实现模式窗口
- window.open实现post提交
- Ruby的Source Repository终于也换成Subversion了
- 我为什么反对语言之争?我的语言历险
- FleaPHP 的 Ajax 支持和 WebControls
- 面试题2:10个靶打中90环的情况有多少种?
- C#获取当前IE地址栏的url
- 模板列中控件实现window.open()并传参
- 获取和安装 FleaPHP
- 面试题1:连续整数之和为1000的共有几组?
- tomcat6.0的虚拟目录配置
- 发现ajax应用在firefox上同步的问题
- 地址空间布局随机化(Address Space Layout Randomization)与缓冲区溢出攻击
- 误导程序员的喧嚣:评CSDN引导Java和Ruby之争
- FleaPHP 开发指南 - A2. 使用 PATHINFO 和 URL 重写
- 一道Google top coder的850分例题及解答