pass value from one user control to another

i have a web page (Page.aspx) that contains a main user control (Main.ascx) which has two other controls within it (A.ascx, B.ascx).  I have a text box and a button in A.ascx, when the user clicks the button i want the text in the textbox to be captured and then displayed on B.ascx.  I have seen a few discussions on this using RaiseEvent but I'm not sure how to do it.  Does anyone have any ideas?
1
kuruption20877
8/14/2003 3:21:41 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

2 Replies
1176 Views

Similar Articles

[PageSpeed] 18

0
rasheeda
8/14/2003 4:59:56 PM
thanks rasheeda, this post helped me out alot also.

http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=115712
0
kuruption20877
8/14/2003 7:21:41 PM
Reply:

Similar Artilces:

Pass value from one User Control to another User Control
I have tried to pass value from one user control to another user control. Because of Page Auto Postback, Contrls are load before page is loaded. So I get the value in 2nd UC after one more post back operation. I have visited many suggessions but I cant solve this. Is anyone can help me to solve this. Thank U mfhossain@gmail.com Muhmmad Fakhrul HossainEmail: mfhossain@gmail.comPhone: +88 01715 111512Web: http://www.mfhossain.info You'd have to do that through the parent probably in it's Page_Load event handler.   userControl1.publicProperty = userControl2.publicProperty;  ...

How to pass control values from one ascx user-control to another???
Our site is set up using a primary default aspx page that is used as the "base page" for everything. On this page, we dynmaically place various user controls at run-time. This gives us a functionality similar to using frames where the outer-frame actually just sits there while various webfiles are loaded inside of it. Works great except for one thing... trying to figure out the best way to pass control names/values accross user controls. When the same usercontrol is posting back to itself this is a non issue. So far most of our functionality has worked well using the local...

want to call one c#.net function in one user control from another user control
hi i have two user controls info.ascx and personal.ascx i have a function like in info.ascx i have a function like showdetails() {   } now i want to access this function from personal.ascx can i do this ? thanks in advance. shwetaThanksshwetaIn a day when don't come across any problem -you can be sure that you are traveling in wrong path  you should better create a class where you will define the "functions" that you need in both files. declare "static" the function and call it like nameofclass.nameoffunction In a web project you can...

Passing Values from a Web Form to Another Web Form
Hello All! I am trying to pass values from one web form to another web form. I know that there are 3 ways of doing this: queryString, Server.Transfer and Session. I am using the Server.Transfer method. But I am not able to create, in my 2nd web form, an instance of my 1st web form. My 1st Web form is named CallTrack.aspx and my 2nd is named Export.aspx. What I mean is something like this: Public value as CallTrack. I can't create it in my 2nd web form because when the intellisense is displayed, there's no CallTrack in the options. Thanks!   How about using cross-...

I have a web user control being used by another web user control, but the one being used will not display the labels in the resx file.
I am using DotNetNuke version 3.13 (might be 3.013) on a Window's XP machine, SP2. I have what I find to be an extremely odd situation. I have a project called TDS.Controls. This project is a web control library. Each control has its own resx file, which is located in the App_LocalResources directory. Each control inherits from Framework.UserControlBase, just like DotNetNuke's User control in DNN\Controls\User.ascx.vb. As a matter of fact, this control is doing the exact same thing I am trying to do. It is a web user control with its own resx file being used by another web user control (See ...

How do you pass a value from one user control to another?
There must be an example of this somewhere but if there is I can't find it. I have a web form containing 2 user controls. The first displays a list of people. The user selects the person they are interested in and details of that person are to be displayed in the second user control. What is the best way of passing the selected item from the first user control to the second. I can do it with session variables, but there must be a better way than that. thanks You can use properties for that.User Controlprivate string m_Person;public string Person{    get {...

Passing values from one web control to another.
I'm trying to pass a value from one user control to another. Basically, the first user control selects an id number and then the second user control takes that id number and updates a record in a database. I have the second control set up to accept values using public string idnumber; public string IDnumber { set { idnumber = value; } } The second user control has two buttons that do postbacks, depending on which is clicked, a value is updated in the database identified by this number. The problem I am having is that before I click th...

To pass values from one user control to another
Hi,       I have a page where there is a user control. inside that user control(let's say Usercontrol1) i have another user control(lets say Usercontrol2). in the usercontrol2 i have a tree and a button. When the page gets loaded first the treeview in the usercontrol2 should not get populated only when i click on a button in the Usercontrol1, then only the treeview in the Usercontrol2 should get populated. also i want to pass the text of a selected treenode when i click on the usercontrol2's button to a textbox in the userc...

Pass Values from a user control to a web form
Hi All,  I am currently trying to add captcha to my webform. I have a question on how to pass a number/string from a .ascx to a .aspx page. The aspx is being used in the .ascx (user control) in an image tag. <asp:Image ID="imgCaptcha" runat="server" ImageUrl="Image.aspx"/> The aspx page is being rendered as a jpeg image. So Inorder for the captcha to be displayed with the image, I need to pass the code from the user control to the aspx page. I have an option to pass the number as a query string or use it in session. But is there any ot...

Pass values from one user control to a user control on a different aspx page
Hello, I have an aspx page titled Search.aspx. Within this page, I have a user control titled Search.ascx. I want a user to input search terms, then on the click of a button, I want to pass the values to another page (SearchResults.aspx)....which will then display the results in a user control. Can someone please give me some suggestions on how to do this? Thanks a lot! Hello, what you can do is: inside ur usercontrol, create a method that returns a dataset or datareader. that is, since u are searching using the usercontrol, then the result of ur search will be return...

How to use a web user control from one web app in another web app?
I have a production web app project (at work) that has custom web user controls in it.I have another web app project for experimenting and I want to use some web controls from the production web app. The big trick is that I need to load the controls dynamically.LoadControl() doesn't seem to work - it complains about loading controls from a different application. I also tried adding a project reference to the production web app and using "UC1 newUC = new UC1();" and then "this.Controls.Add(newUC);", but the controls (like TextBoxes) on the web user control don't seem to exist on the new UC1s....

Trying to pass values from one control to another control
I have 2 controls on my page. CaseList and Email Reviwer. CaseList contain a datagrid that when the button (5th column) is clicked 2 values should be passed to the email revier control. In the email Reviwer Control I have declared: I have: public void sendCaseIdCatId(int catid,int caseid) { ViewState["EmailReviewerCategoryId"] = catid; ViewState["EmailReviewerCaseid"] = caseid; } in my EmailReviwer control   I tried: //Display the email reviewer panel EmailCaseReviewer.Visible=true; string strcatid = e.Item.Cells[1].Text.ToString(); string strcaseid = e.Item.Cells[0].Text.T...

Setting control values from one user control to another
I have two user controls on a page.  Control 1 is view. Control2 is search.  User selects value on Control2 and I want to update Control1(View).  I cannot find syntax to change values on Control1 from Control2.  The following is function on Control1 that is called from Control2 after pageInit and load on Control1.  I have tried many many ways to findControl but all fail. 'Function on Control1 called from Control2 after Control1 PageInit/load:         Public Function loadForm...

Pass data from Web User Control to Web Form
I have a Web Form that contains a Web User Control. The WUC displays dynamic content. I want to change the TITLE property of the Web Form, based on the contents of the WUC. For example, if the WUC displays information about Horses, I want to change the page title to "HORSES" by passing the string to the parent Web Form. I have tried playing with parameters and such, but I can't remember how I did this in the past. PLEASE HELP!~o0 Spin-Monkey Oo~ The best way to do this is by creating a public property on your web user control and accessing that from your web form. Check ...

Web resources about - pass value from one user control to another - asp.net.web-forms

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

WA bushfires: Firefighters work through the night to control several blazes
Firefighters in Western Australia are working through the night to control and contain several blazes.

Alaska Marijuana Control Board votes to allow consumption in retail outlets - Alaska Dispatch News
The Alaska Marijuana Control Board voted Friday to allow consumption of marijuana products in retail stores across the state. But social clubs, ...

69 percent of users would bypass security controls to win a big deal
When faced with the chance of clinching a major deal people are willing to throw security controls out of the window. This is according to research ...

MAZEL TOV, HILLARY: Clinton Wins Gun Control Award From Major Anti-Bill of Rights Group
... restrictions on the freedoms protected by the Constitution is not a sign of character, but a clear indication of blind adherence to a gun control ...

Obama to Veto Bill Requiring Background Checks On Syrian Refugees; France Demands Tighter Controls, EU ...
... does not call for ending the refugee program or require religious screenings, as some Republicans have demanded . France Demands Tighter Controls, ...

Brussels Pushes Gun Control In Wake of Paris Attacks
Europeans double down on gun control after terrorists murder defenseless civilians

Control Your HTPC With Scavenged IR Parts
If you’ve built yourself a home theater PC, one of your highest priorities is probably coming up with a convenient control solution. The easiest ...

ICYMI: Even the AP couldn’t validate any of Hillary’s gun control nonsense
... – not 200 as she claimed . Asked to explain the discrepancy, Clinton’s campaign pointed to 2013 statistics from the Centers for Disease Control ...

5 Questions: Punjab’s rightful control over Chandigarh, says Prem Singh Chandumajra
Shiromani Akali Dal (Badal) MP Prem Singh Chandumajra on why he raised the issue of Punjab’s claim over Chandigarh in LS.

Resources last updated: 11/25/2015 1:45:21 AM