Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to get popup window

how to get popup window

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    harithadotnet
    wrote on last edited by
    #1

    Hi I have created image controls dynamically. when i click that image control someother page should be displayed as a popup window how to do this?? my code is : ImageButton imga; Panel pana; LiteralControl LL1; private void Page_Load(object sender, System.EventArgs e) { string idvalue; idvalue= Request.QueryString["id"]; int cnt; cnt=Convert.ToInt32(Request.QueryString["count"]); Session["impath"]="audio_release/"+ idvalue +""; int cnt1; if (cnt % 3==0) { cnt1=cnt/3; } else { cnt1=((cnt/3)+1); } for (int i=1;i<=cnt1;i++) { imga = new ImageButton(); pana=new Panel(); imga.ID = "img" +i.ToString(); imga.Width=200; imga.Height=150; imga.ImageUrl="audio_release/" + idvalue + "/"+ i +".jpg"; pana.ID="pl1"+i.ToString(); LL1= new LiteralControl("
    "); pana.Controls.Add(LL1); pana.Controls.Add(imga); mainpan.Controls.Add(pana); imga.Click +=new ImageClickEventHandler(Imagea_Click); } } protected void Imagea_Click ( object sender, ImageClickEventArgs e ) { ImageButton imga = ( ImageButton )sender; string s=imga.ImageUrl; popup('s'); Response.Redirect("audioimage.aspx"); } here i want to display audioimage.aspx as popup window. plz let me know if u know the ans Thanks in advance.

    Haritha

    R 1 Reply Last reply
    0
    • H harithadotnet

      Hi I have created image controls dynamically. when i click that image control someother page should be displayed as a popup window how to do this?? my code is : ImageButton imga; Panel pana; LiteralControl LL1; private void Page_Load(object sender, System.EventArgs e) { string idvalue; idvalue= Request.QueryString["id"]; int cnt; cnt=Convert.ToInt32(Request.QueryString["count"]); Session["impath"]="audio_release/"+ idvalue +""; int cnt1; if (cnt % 3==0) { cnt1=cnt/3; } else { cnt1=((cnt/3)+1); } for (int i=1;i<=cnt1;i++) { imga = new ImageButton(); pana=new Panel(); imga.ID = "img" +i.ToString(); imga.Width=200; imga.Height=150; imga.ImageUrl="audio_release/" + idvalue + "/"+ i +".jpg"; pana.ID="pl1"+i.ToString(); LL1= new LiteralControl("
      "); pana.Controls.Add(LL1); pana.Controls.Add(imga); mainpan.Controls.Add(pana); imga.Click +=new ImageClickEventHandler(Imagea_Click); } } protected void Imagea_Click ( object sender, ImageClickEventArgs e ) { ImageButton imga = ( ImageButton )sender; string s=imga.ImageUrl; popup('s'); Response.Redirect("audioimage.aspx"); } here i want to display audioimage.aspx as popup window. plz let me know if u know the ans Thanks in advance.

      Haritha

      R Offline
      R Offline
      Raghvendra Kumar Roy
      wrote on last edited by
      #2

      in Imagea_Click event you call javascript function . in that function you can define window.open method i.e. open (URL, windowName[, windowFeatures]) protected void Imagea_Click ( object sender, ImageClickEventArgs e ) { ImageButton imga = ( ImageButton )sender; imga.ImageUrl="javascript:load()" //popup('s'); Response.Redirect("audioimage.aspx"); } in html page you can write: function load() { window.open("audioimage.aspx","mywindow","menubar=1,resizable=1,width=350,height=250"); } Thanks

      Raghvendra Kumar Roy

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups