TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sie Ste
NA
196
185.1k
Asp.net pass field values
Nov 1 2011 6:38 PM
I am asking the following question since this is the first few C# asp.net 2010 web form pages I am working with at my company. My problem is I want to pass the value of orgName from the code listed below to a new web page called Next_Page.aspx as a session variable. The problem is by the time I get to the method called 'submit_button', I do not have the value of 'orgName' any longer. Thus can you tell me what I need to do to have the value of 'orgName' obtain from the 'FindOrg' available to the 'submit_button' method? If the value or orgname is within the (object sender, EventArgs e) of the SubmitButton method can you tell me how to access this value?
The code listed below is all from the same web page called first.aspx.cs.
The following is the current code:
protected void FindOrg(object sender, EventArgs e)
{
try
{
String strOrgSql = "";
String orgName = txtOrgName.Text.Trim();
}
catch (Exception ex)
{
//do something
}
}
protected void submit_button(object sender, EventArgs e)
{
try
{
want orgname value here
Session["orgname"] = orgname;
Response.Redirect("~/Next_Page.aspx");
}
catch (Exception ex)
{
// do something
}
}
Reply
Answers (
3
)
Table control asp.net 2010
Cannot find trigger and event palette in silverlight application