M
markm75
I have a simple page i'm trying to do dynmaically.. i have a page called
submitcomments.aspx with the .cs codebehind..
before i created everything in design view.. now i've ripped that out and
added a asp panel to the page and created a procedure in my c# datalayer.cs
file called drawsubmitcomments
in that procedure i create the text boxes and buttons.
Problem is.. this code is not in the code behind for the page, so when i do
commands like response.redirect.. i have to create a variable.. like say
"Page varPage" and do a varPage.Response.redirect from the datalayer.cs
procedure (which im not even sure if it will work)..
I also had to create the click event, which now resides in that cs file as
well.. so on the click event i cant check the values for say txtBOX1.text
etc.. unless i made these text boxes "global variables" to the datalayer.cs..
I'm not sure what the best practice is for something like this.. should i
have done all the dynamic creation in the .cs codebehind file.. or make the
variables global over there.. or something else?
Thanks for any tips
submitcomments.aspx with the .cs codebehind..
before i created everything in design view.. now i've ripped that out and
added a asp panel to the page and created a procedure in my c# datalayer.cs
file called drawsubmitcomments
in that procedure i create the text boxes and buttons.
Problem is.. this code is not in the code behind for the page, so when i do
commands like response.redirect.. i have to create a variable.. like say
"Page varPage" and do a varPage.Response.redirect from the datalayer.cs
procedure (which im not even sure if it will work)..
I also had to create the click event, which now resides in that cs file as
well.. so on the click event i cant check the values for say txtBOX1.text
etc.. unless i made these text boxes "global variables" to the datalayer.cs..
I'm not sure what the best practice is for something like this.. should i
have done all the dynamic creation in the .cs codebehind file.. or make the
variables global over there.. or something else?
Thanks for any tips