User Name Password Register
DaniWeb IT Discussion Community
All
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 391,782 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 3,583 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

how to open popup window by clicking hyperlink in gridview and to pass query string

Join Date: Dec 2007
Posts: 287
Reputation: ericstenson is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 28
Colleague
ericstenson's Avatar
ericstenson ericstenson is offline Offline
Posting Whiz in Training

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."
Reply With Quote  
All times are GMT -4. The time now is 5:00 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC