How to pass Parameter to a Web User Control?

Posted on 2005-04-14
Last Modified: 2008-02-01
A would like to develop a Web User Control that will handle a data insert/update process. So, my control needs to know when it will attempt to insert data and when it should modify data. So, is there anyway to pass some parameters to my WebUserControl to inform it whitch operation should it perform?

Question by:regisdaniel
    LVL 9

    Expert Comment

    Hi regisdaniel,

     Yep use the <param name="Layout" value="ThreePanes"> of the <object> and just use a normal property get/set method for this param name.


    Author Comment

    Thanks cyberdevil67!!!

    But, I'm newbie to ASP.Net. Could you please give me a more complete example of how doing this?

    Thanls a lot!!!
    LVL 5

    Accepted Solution


    Passing Values between User Controls and ASPX Page

    LVL 9

    Assisted Solution

    Any control in a website mus be used with object in html..

                 <object type="application/x-oleobject"
                      classid="clsid:A18962F6-E6ED-40B1-97C9-1FB36F38BFA8" width="600" height="500"
                      CodeBase="" id="ImageUploader" name="ImageUploader" VIEWASTEXT>

                      <param name="Layout" value="ThreePanes">

    Then just as I said in your code, write a get/set method to use this, there are plent of these examples of using set/get ini your MSDN if you installed that.

    Or use the example from here

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now