Click here to Skip to main content
15,352,974 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
this is my code below

Dim s As String = "window.showModalDialog('frm_print_rdlc_rpt.aspx?rpt_id=1 &frmt_id=2,'Popup_Window','width=300,height=300,left=100,top=100,resizale=yes');"

       ClientScript.RegisterStartupScript(Me.GetType(), "Script", s, True)

but this script is not work.

plese help me,where i am wrong or alternetive solution.....

Updated 19-Oct-14 21:58pm

First of all, you have a syntax error of a missing quote after frmt_id=2!
And also showModalDialog is a non-standard method that may not be supported in all browser and/or all versions!
[no name] 20-Oct-14 4:11am
I agree with Peter. Check this out -

Try this. Use a jquery function on aspx, and call that in your code.
function ShowPopup(message) {
       function ShowPopup(message) {
       $(function () {
               title: "jQuery Dialog Popup",
               buttons: {
                   Close: function () {
               modal: true

And then call it like this:
 Protected Sub btnShowPopup_Click(sender As Object, e As System.EventArgs) Handles btnShowPopup.Click
    Dim message As String = "Message from server side"
    ClientScript.RegisterStartupScript(Me.GetType(), "Popup", "ShowPopup('" + message + "');", True)
End Sub

Also check this out :[^]

Hope this helps !! :)

Dheerendra Dwivedi 20-Oct-14 4:44am
Praneet,i want to show aspx page with data not message ,your solution is work for message ,
[no name] 20-Oct-14 4:46am
You can use the sessino object. In the OnLoad event of your popup, you can fetch the data from the session object and use it.
Dheerendra Dwivedi 20-Oct-14 4:48am
i have use session for data and i got it,but problem is that how to show this on Popup windows,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900