Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 10th, 2006, 06:57 AM
Authorized User
Join Date: Jan 2006
Location: gangtok, Sikkim, India.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default using javaScript in the code behind

  please could any one tell how to open a popup using javascript in the code behind of an asp.net application..... and also pass some parameters in the url ie.
window.open("xyz.aspx?a="+value1+"&b="+value2,"",f eatures) ..this is
fine in the client side code but how can i use it in the code behind.. thank you

  #2 (permalink)  
Old April 10th, 2006, 03:19 PM
Authorized User
Join Date: Mar 2006
Location: , , .
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts

I was workin on a similar kind of issue some time ago, I used Page.RegisterStartupScript method.
I had to produce a pop up window with a chart and related data based on several listbox selections on the click of a button. Following is a VB.NET code that I wrote to achieve what I just explained. Hope this is what you are looking for.

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strPop As String
        Dim file As String
        file = "chartmaker.aspx?chType=" & lst_ChType.SelectedValue & "&Table=" & lst_Table.SelectedValue & "&Values=" & lst_Values.SelectedValue & "&Categories=" & _
                lst_Categories.SelectedValue & "&Series=" & lst_Series.SelectedValue

        strPop = "<script language='javascript'>" & vbCrLf _
                & "window.open('" & file & "','Report','menubar=1,status=1,scrollbars=1,resiz able=1')" & vbCrLf _
                & "</script>" & vbCrLf
        Page.RegisterStartupScript("Pop", strPop)

    End Sub
Sai Puli


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript code popuri_krishna Javascript How-To 0 May 23rd, 2007 11:58 PM
problems with JavaScript Code red_fiesta Javascript 5 March 6th, 2007 04:44 PM
calling javascript as well as codebehind code k.manisha C# 1 November 27th, 2006 08:47 AM
javascript as well as codebehind code k.manisha .NET Framework 1.x 0 November 24th, 2006 04:23 AM
JavaScript Code problem Ben Horne Javascript 5 February 11th, 2006 02:10 AM

All times are GMT -4. The time now is 08:20 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.