Click here to Skip to main content
15,897,704 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: No. of hites facility in my website Pin
Christian Graus27-Jun-07 11:00
protectorChristian Graus27-Jun-07 11:00 
AnswerRe: No. of hites facility in my website Pin
Vasudevan Deepak Kumar27-Jun-07 21:40
Vasudevan Deepak Kumar27-Jun-07 21:40 
QuestionProperty value after PostBack of UserControl Pin
ZeedijkMike27-Jun-07 4:41
ZeedijkMike27-Jun-07 4:41 
AnswerRe: Property value after PostBack of UserControl Pin
ZeedijkMike27-Jun-07 4:43
ZeedijkMike27-Jun-07 4:43 
AnswerRe: Property value after PostBack of UserControl Pin
SHatchard27-Jun-07 5:28
SHatchard27-Jun-07 5:28 
GeneralRe: Property value after PostBack of UserControl Pin
ZeedijkMike27-Jun-07 5:56
ZeedijkMike27-Jun-07 5:56 
AnswerRe: Property value after PostBack of UserControl Pin
Urs Enzler27-Jun-07 8:44
Urs Enzler27-Jun-07 8:44 
QuestionRetrieving Property value after PostBack of UserControl Pin
ZeedijkMike27-Jun-07 4:39
ZeedijkMike27-Jun-07 4:39 
Hi Allm

I have created a MaskedTextBox UserControl with a number of properties (Value, MinValue, MaxValue etc.) The UserControl works but I am not able to actually get the Value from the UserControl in the main apsx page. In short what I have done:

UserControl with a TextBox, a RangeValidator and some JavaScript to take care of the formatting.

In the main page:
<uc1:MaskedTextBox ID="MaskedTextBox2" runat="server" MinValue="-10000" MaxValue="10000" ErrorMessage="Value must be between {0} and {1}" Required="true" Display="None" /><br />
<br /><br />
<asp:Button ID="Button1" runat="server" Text="Button" /></div><br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br />


And in the code behind on_load event:
<br />
    protected void Page_Load(object sender, EventArgs e)<br />
    {<br />
        if (Page.IsPostBack)<br />
        {<br />
            Label2.Text = MaskedTextBox2.TextValue.ToString();<br />
        }<br />
    }<br />


But the value of the TextValue property is not available because the UserControl is loaded after the Page_Load event. How do I get the TextValue of the UserControl in the PostBack of the aspx page?
I would prefer not to use Session or ViewState because I would like to use the UserControl as I would use a 'normal' TextBox. Any ideas out there?

Kind regards,

Mike

AnswerRe: Retrieving Property value after PostBack of UserControl Pin
Venkatesh Mookkan27-Jun-07 17:38
Venkatesh Mookkan27-Jun-07 17:38 
QuestionSQL Query works intermittently... Pin
TenmanS1427-Jun-07 4:39
TenmanS1427-Jun-07 4:39 
AnswerRe: SQL Query works intermittently... Pin
Colin Angus Mackay27-Jun-07 5:12
Colin Angus Mackay27-Jun-07 5:12 
GeneralRe: SQL Query works intermittently... Pin
TenmanS1427-Jun-07 5:26
TenmanS1427-Jun-07 5:26 
GeneralRe: SQL Query works intermittently... Pin
Colin Angus Mackay27-Jun-07 6:09
Colin Angus Mackay27-Jun-07 6:09 
GeneralRe: SQL Query works intermittently... Pin
TenmanS1427-Jun-07 8:47
TenmanS1427-Jun-07 8:47 
GeneralRe: SQL Query works intermittently... [modified] Pin
TenmanS1427-Jun-07 9:20
TenmanS1427-Jun-07 9:20 
Questionurgent need about stored procedure..., Pin
Member 387988127-Jun-07 3:21
Member 387988127-Jun-07 3:21 
AnswerRe: urgent need about stored procedure..., Pin
Colin Angus Mackay27-Jun-07 3:37
Colin Angus Mackay27-Jun-07 3:37 
AnswerRe: urgent need about stored procedure..., Pin
dekart_roo27-Jun-07 6:46
dekart_roo27-Jun-07 6:46 
QuestionPrinting Pin
Blue_Boy27-Jun-07 3:10
Blue_Boy27-Jun-07 3:10 
AnswerRe: Printing Pin
Vasudevan Deepak Kumar27-Jun-07 3:13
Vasudevan Deepak Kumar27-Jun-07 3:13 
GeneralRe: Printing Pin
Blue_Boy27-Jun-07 5:27
Blue_Boy27-Jun-07 5:27 
QuestionExport Crystal reports Pin
itzmevishu27-Jun-07 2:51
itzmevishu27-Jun-07 2:51 
AnswerRe: Export Crystal reports Pin
Vasudevan Deepak Kumar27-Jun-07 3:08
Vasudevan Deepak Kumar27-Jun-07 3:08 
GeneralRe: Export Crystal reports Pin
itzmevishu27-Jun-07 3:13
itzmevishu27-Jun-07 3:13 
GeneralRe: Export Crystal reports Pin
Vasudevan Deepak Kumar27-Jun-07 3:35
Vasudevan Deepak Kumar27-Jun-07 3:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.