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
  1. Home
  2. Web Development
  3. ASP.NET
  4. Links in Placeholder

Links in Placeholder

Scheduled Pinned Locked Moved ASP.NET
design
5 Posts 3 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.
  • N Offline
    N Offline
    NET India
    wrote on last edited by
    #1

    I have a web page. This page contains a PlaceHolder and this placeholder brings or holds some links created by the admin at runtime. Not when we design the page i mean there is no exact no. of the links to be created by the admin. Let an admin create Four links like Jan,Feb,Mar,Apr..... Now i want as the client clicks on Jan link then a panel or imageButton should display the image of month Jan and if he/she clicks on Feb link then image of Feb month should display

    T S 2 Replies Last reply
    0
    • N NET India

      I have a web page. This page contains a PlaceHolder and this placeholder brings or holds some links created by the admin at runtime. Not when we design the page i mean there is no exact no. of the links to be created by the admin. Let an admin create Four links like Jan,Feb,Mar,Apr..... Now i want as the client clicks on Jan link then a panel or imageButton should display the image of month Jan and if he/she clicks on Feb link then image of Feb month should display

      S Offline
      S Offline
      Spunky Coder
      wrote on last edited by
      #2

      Write a common event handler like private void linkmonth_Click(object sender, EventArgs e).. Now attach this eventhandler to the created links at runtime... link1.Click += new EventHandler(linkmonth_Click); link2.Click += new EventHandler(linkmonth_Click); link3.Click += new EventHandler(linkmonth_Click); ......and so on... Now in the event handler linkmonth_click, based on the sender object load the appropriate image and display... Here at runtime the admin should add linkbutton instead of Html tag... -- modified at 7:38 Monday 22nd October, 2007

      Koushik

      N 1 Reply Last reply
      0
      • N NET India

        I have a web page. This page contains a PlaceHolder and this placeholder brings or holds some links created by the admin at runtime. Not when we design the page i mean there is no exact no. of the links to be created by the admin. Let an admin create Four links like Jan,Feb,Mar,Apr..... Now i want as the client clicks on Jan link then a panel or imageButton should display the image of month Jan and if he/she clicks on Feb link then image of Feb month should display

        T Offline
        T Offline
        taltal81
        wrote on last edited by
        #3

        CMS?

        N 1 Reply Last reply
        0
        • T taltal81

          CMS?

          N Offline
          N Offline
          NET India
          wrote on last edited by
          #4

          means

          1 Reply Last reply
          0
          • S Spunky Coder

            Write a common event handler like private void linkmonth_Click(object sender, EventArgs e).. Now attach this eventhandler to the created links at runtime... link1.Click += new EventHandler(linkmonth_Click); link2.Click += new EventHandler(linkmonth_Click); link3.Click += new EventHandler(linkmonth_Click); ......and so on... Now in the event handler linkmonth_click, based on the sender object load the appropriate image and display... Here at runtime the admin should add linkbutton instead of Html tag... -- modified at 7:38 Monday 22nd October, 2007

            Koushik

            N Offline
            N Offline
            NET India
            wrote on last edited by
            #5

            First of All Thnx for ur solution but still i have a problem actually i'm having only one linkbutton for the all the links being created. Now problem is How it would be understood which link being clicked private void linkmonth_Click(object sender, EventArgs e) { Wht code i should write here when a link is clicked to display it's corresponding image } ================== Here below i'm putting my code plz try to understand on Page Load call createTable1() function public void createTable1() { Table table=new Table(); TableRow trRow; TableCell tcCell1=null; DataUtility dUT=new DataUtility(); string strsql="Select LinkName From AnmolTable Where Active=1"; DataTable dt=dUT.getDataTable(strsql); int total=Convert.ToInt32(dt.Rows.Count); for(int i=0;i<1;i++) { trRow=new TableRow(); //rowno=i+1; for(int j=0;j

            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