Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

C# ASP.NET Clear TextBox on UserControl

Posted on 2009-12-27
4
Medium Priority
?
501 Views
Last Modified: 2012-05-08
I have a UserControl (rcRushReason) that I have placed in my default.aspx page for my website.  The UserControl (rcRushReason) has a textbox (txtReasonRush) in it that sometimes maintains text that I need to clear.  Is there a way I can click a button on default.aspx to clear the text in rcRushReason.txtReasonRush ?   I will be loading the user control (rcRushReason) with the same button click.
Thanks.
0
Comment
Question by:jamesdean666
  • 2
  • 2
4 Comments
 
LVL 61

Expert Comment

by:HainKurt
ID: 26128062
maybe you can use findcontrol

dim txt as TextBox = rcRushReason.FindControl("txtReasonRush")
txt.Text = ""
0
 

Author Comment

by:jamesdean666
ID: 26128084
Do you know what this would be in C#?
0
 
LVL 61

Accepted Solution

by:
HainKurt earned 2000 total points
ID: 26128317
should be

TextBox txt = rcRushReason.FindControl("txtReasonRush");
txt.Text = "";
0
 

Author Closing Comment

by:jamesdean666
ID: 31670230
Yahtzee.... thanks.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline
Suggested Courses

810 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