•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 375,198 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,996 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2227 | Replies: 4
![]() |
•
•
Join Date: Mar 2008
Posts: 47
Reputation:
Rep Power: 1
Solved Threads: 1
how to open popup window by clicking hyperlink in gridview and to pass query string
#1
Apr 2nd, 2008
Re: how to open popup window by clicking hyperlink in gridview and to pass query string
#2
Apr 2nd, 2008
Re: how to open popup window by clicking hyperlink in gridview and to pass query string
#3
May 5th, 2008
Hi... I would suggest passing the CompanyID in Session -- Session.Add("CompanyID") -- and retrieving the companyid -- Session.Item("ComanyID") from the popup.
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles GridView1.RowCommand
If GridView1.Rows.Count - 1 > 0 Then
If e.CommandName = "WHATEVERYOURBUTTONCOMMANDNAME" Then
Dim CompanyID As String = GridView1.DataKeys(Convert.ToString(e.CommandArgument)).Item(0).ToString
Session.Add("CompanyID", CompanyID)
Response.Write("<script>")
Response.Write("window.open(YOURDETAILSWINDOW.aspx','_blank','toolbar=0,location=0,menubar=0,resizable=0,width=400,height=320')")
Response.Write("</script>")
end if
end if
Last edited by ericstenson : May 5th, 2008 at 5:11 pm. Reason: forgot end if
--
"Dummy."
"Dummy."
•
•
Join Date: May 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Re: how to open popup window by clicking hyperlink in gridview and to pass query string
#4
May 6th, 2008
<asp:TemplateField HeaderText="Header">
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
<ItemTemplate>
<a onclick="javascript:window.open('PricePage.aspx?id=<%#DataBinder.Eval(Container.DataItem,"Columnname")%>&show=<%#DataBinder.Eval(Container.DataItem,"Columnname")%>');" href="#" id="a6" ><%#DataBinder.Eval(Container.DataItem, "Columnname")%></a>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Header">
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
<ItemTemplate>
<a onclick="javascript:window.open('PricePage.aspx?id=<%#DataBinder.Eval(Container.DataItem,"Columnname")%>&show=<%#DataBinder.Eval(Container.DataItem,"Columnname")%>');" href="#" id="a11" ><%#DataBinder.Eval(Container.DataItem, "Columnname")%></a>
</ItemTemplate>
</asp:TemplateField>
hi u can use this code and pass query string
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
<ItemTemplate>
<a onclick="javascript:window.open('PricePage.aspx?id=<%#DataBinder.Eval(Container.DataItem,"Columnname")%>&show=<%#DataBinder.Eval(Container.DataItem,"Columnname")%>');" href="#" id="a6" ><%#DataBinder.Eval(Container.DataItem, "Columnname")%></a>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Header">
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle>
<ItemTemplate>
<a onclick="javascript:window.open('PricePage.aspx?id=<%#DataBinder.Eval(Container.DataItem,"Columnname")%>&show=<%#DataBinder.Eval(Container.DataItem,"Columnname")%>');" href="#" id="a11" ><%#DataBinder.Eval(Container.DataItem, "Columnname")%></a>
</ItemTemplate>
</asp:TemplateField>
hi u can use this code and pass query string
•
•
Join Date: May 2008
Posts: 45
Reputation:
Rep Power: 1
Solved Threads: 1
Re: how to open popup window by clicking hyperlink in gridview and to pass query string
#5
May 6th, 2008
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
age amd avatar blue gene chips database dell development dos drivers economy energy enterprise firefox graphics hardware ibm ibm. news intel intel ibm internet it linux memory microsoft mozilla news open open source open-source opengl openoffice ps3 recession red hat russia software source sun super supercomputer supercomputing system technology trends ubuntu vista windows working x86
- Previous Thread: Button to open a new browser window
- Next Thread: Need urgent help


Linear Mode