Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 17, 2010 07:36 AM by mohdasghar_ali
Member
374 Points
166 Posts
Feb 16, 2010 09:37 AM|LINK
How to open popup window in datalist hyperlink with databinding
my code is:
All-Star
16323 Points
2595 Posts
Feb 16, 2010 04:09 PM|LINK
You can open a popup with a linkbutton and you can pass data through. For example if you want to pass the ID as a querystring you do this:
<asp:LinkButton ID="LinkButton1" runat="server" Text='<%#Eval("abc") %>' OnClientClick='<%# Eval("ID", "window.open(\"PopupPage.aspx?ID={0}\", null, \"width=500,height=350,top=100,left=10\", \"true\");") %>' />
Feb 17, 2010 07:36 AM|LINK
Thanks,
I've done another way:
<asp:HyperLink ID="abc" runat="server" Text='<%#Eval("abc") %>' NavigateUrl='<%#"page1.aspx?Id="+Eval("columnName") %>' onClick="window.open(this.href,'popupwindow','status=yes,scrollbal=yes,width=720,height=250'); return false></asp:HyperLink>
mohdasghar_a...
Member
374 Points
166 Posts
DataList hyperlink, open popup window with databinding
Feb 16, 2010 09:37 AM|LINK
How to open popup window in datalist hyperlink with databinding
my code is:
http://www.aliwebdev.com
(Web Designer and Developer)
Do not forget to "MARK AS ANSWER" on the post that helped you.
rivdiv
All-Star
16323 Points
2595 Posts
Re: DataList hyperlink, open popup window with databinding
Feb 16, 2010 04:09 PM|LINK
You can open a popup with a linkbutton and you can pass data through. For example if you want to pass the ID as a querystring you do this:
<asp:LinkButton ID="LinkButton1" runat="server" Text='<%#Eval("abc") %>' OnClientClick='<%# Eval("ID", "window.open(\"PopupPage.aspx?ID={0}\", null, \"width=500,height=350,top=100,left=10\", \"true\");") %>' />
mohdasghar_a...
Member
374 Points
166 Posts
Re: DataList hyperlink, open popup window with databinding
Feb 17, 2010 07:36 AM|LINK
Thanks,
I've done another way:
<asp:HyperLink ID="abc" runat="server" Text='<%#Eval("abc") %>' NavigateUrl='<%#"page1.aspx?Id="+Eval("columnName") %>' onClick="window.open(this.href,'popupwindow','status=yes,scrollbal=yes,width=720,height=250'); return false></asp:HyperLink>http://www.aliwebdev.com
(Web Designer and Developer)
Do not forget to "MARK AS ANSWER" on the post that helped you.