[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 651
  • Last Modified:

How to pass Parameter to a Web User Control?

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?

Thanks!
0
regisdaniel
Asked:
regisdaniel
  • 2
2 Solutions
 
cyberdevil67Commented:
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.

Cheers!
0
 
regisdanielAuthor Commented:
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!!!
0
 
allanau20Commented:

Passing Values between User Controls and ASPX Page

http://www.c-sharpcorner.com/Code/2005/Jan/PassingValuesfrmUCtoASPX.asp

HtH.
0
 
cyberdevil67Commented:
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="ImageUploader3.cab" id="ImageUploader" name="ImageUploader" VIEWASTEXT>

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

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

http://blogs.msdn.com/robgruen/archive/2004/06/15/156348.aspx
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now