Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Createing a reference to an object
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00718174
Message ID:
00718335
Views:
16
Hi Cathi,

Thanks, I ended up storing a string in using the Session object and using a switch statement that tests for that string. I just wish I could have found a way to create a reference or something to the actual text box so the switch statement wasn't needed.

Aloha,

James

>When you need to "remember" fields between page refreshes, you need to use Session State to hold the reference or use a hidden control that uses viewstate to hold the reference. The online help has examples about how to implement these.
>
>>Hi All,
>>
>>I'm trying my hand at an ASP.Net page. I have a Calendar object that I want to use to assign values to any of 4 different text boxes. Each text box has a corresponding "Show Calendar" button. In the code for the button click I pass the current text box value to the calendars SelectedDate property. I also want to create an object reference or something that will allow me to reference that text box in the SelectionChanged code.
>>
>>Here's the code in one of the "Show Calendar" buttons:
>>
>>private void btnInitiated_Click(object sender, System.EventArgs e)
>>{
>>hideCalendars();
>>cldInitiated.Visible = true;
>>			
>>showCalendar(txtInitiated.Text);
>>textBoxToFill = txtInitiated;
>>}
>>
>>
>>I want to get the effect of the
textBoxToFill = txtInitiated
but with code that works (hehehe). This is so that I can referenc textBoxToFill in the SelectionChanged code. Each "Show Calendar" button will assign the corresponding text box to the textBoxToFill reference.
>>
>>Aloha,
>>
>>James
Previous
Reply
Map
View

Click here to load this message in the networking platform