Results 1 to 5 of 5

Thread: [02/03] Place Holder in ASP.NET

  1. #1

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    [02/03] Place Holder in ASP.NET

    Hi I have few custom web controls in my web application (ASP.NET 1.1). I would like to know that in my web form i want to display a Control dynamically in a place holder. How will i do that ?

    Also, to add to this, this control is to be launched in a pop up window. How do i display a popup window on a button's server click and get values back from that popup window
    Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water

    Huzefa Yousuf
    Software Engineer
    Verticity Inc.
    +92-345-2235303

    [email protected]

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [02/03] Place Holder in ASP.NET

    Placeholder1.Controls.Add(YourControl)

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [02/03] Place Holder in ASP.NET

    To get a window to popup in the button's click event, you'd do

    window.open()

    It takes several parameters, look this up.

    To return values from the popup window, you'd say

    window.opener.document.getElementById('somefield').value = 'adkf';

  4. #4

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Re: [02/03] Place Holder in ASP.NET

    Well both things worked gr8 ! one more question, ryte now I have JavaScript to be called on a Button's click Event, is there a way that i can call it programatically exactly when i want and not to be on some event.
    Women ...r like tea bags, you neva know how strong they really r untill u put them in hot water

    Huzefa Yousuf
    Software Engineer
    Verticity Inc.
    +92-345-2235303

    [email protected]

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [02/03] Place Holder in ASP.NET

    this.Button1.Attributes.Add("onClick","javascript:alert('see?');");

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width