Click here to Skip to main content
15,886,873 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
Palavesam Pattan15-Nov-11 17:55
professionalPalavesam Pattan15-Nov-11 17:55 
AnswerRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
Richard MacCutchan15-Nov-11 21:38
mveRichard MacCutchan15-Nov-11 21:38 
GeneralRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
Palavesam Pattan15-Nov-11 21:53
professionalPalavesam Pattan15-Nov-11 21:53 
AnswerRe: Development Issue : BC30311: Value of type 'System.Web.UI.Control' cannot be converted to 'System.Windows.Forms.TextBox'. Pin
jkirkerx5-Nov-11 17:28
professionaljkirkerx5-Nov-11 17:28 
Questiongridview control Pin
dcof2-Nov-11 8:53
dcof2-Nov-11 8:53 
AnswerRe: gridview control Pin
Anurag Gandhi3-Nov-11 0:30
professionalAnurag Gandhi3-Nov-11 0:30 
QuestionWord Automation Pin
padmanabhan N1-Nov-11 19:56
padmanabhan N1-Nov-11 19:56 
Questionfpassing asp.net field Pin
dcof1-Nov-11 12:36
dcof1-Nov-11 12:36 
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

}

}
[^]
AnswerRe: fpassing asp.net field Pin
Not Active1-Nov-11 13:51
mentorNot Active1-Nov-11 13:51 
GeneralRe: fpassing asp.net field Pin
dcof1-Nov-11 17:47
dcof1-Nov-11 17:47 
GeneralRe: fpassing asp.net field Pin
Brij1-Nov-11 21:48
mentorBrij1-Nov-11 21:48 
GeneralRe: fpassing asp.net field Pin
Not Active2-Nov-11 2:17
mentorNot Active2-Nov-11 2:17 
Questiontable control asp.net 2010 Pin
classy_dog1-Nov-11 9:27
classy_dog1-Nov-11 9:27 
AnswerRe: table control asp.net 2010 Pin
Dennis E White1-Nov-11 12:01
professionalDennis E White1-Nov-11 12:01 
QuestionAsync Report MVC3 Pin
eddieangel1-Nov-11 7:00
eddieangel1-Nov-11 7:00 
QuestionNeeded Code of changing dropdownlist Pin
Raghu1630-Oct-11 19:28
Raghu1630-Oct-11 19:28 
AnswerRe: Needed Code of changing dropdownlist Pin
Anurag Gandhi30-Oct-11 22:47
professionalAnurag Gandhi30-Oct-11 22:47 
QuestionCan't see my site's flash in an iframe tag Pin
benams30-Oct-11 6:37
benams30-Oct-11 6:37 
QuestionSubmitChanges is not working Pin
classy_dog29-Oct-11 8:17
classy_dog29-Oct-11 8:17 
AnswerRe: SubmitChanges is not working Pin
Richard MacCutchan29-Oct-11 22:38
mveRichard MacCutchan29-Oct-11 22:38 
GeneralRe: SubmitChanges is not working Pin
classy_dog30-Oct-11 11:06
classy_dog30-Oct-11 11:06 
GeneralRe: SubmitChanges is not working Pin
Richard MacCutchan30-Oct-11 23:36
mveRichard MacCutchan30-Oct-11 23:36 
AnswerRe: SubmitChanges is not working Pin
phil.o29-Oct-11 23:54
professionalphil.o29-Oct-11 23:54 
GeneralRe: SubmitChanges is not working Pin
classy_dog30-Oct-11 11:08
classy_dog30-Oct-11 11:08 
GeneralRe: SubmitChanges is not working Pin
phil.o30-Oct-11 23:18
professionalphil.o30-Oct-11 23:18 

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.