N
netasp
hi all,
when adding a new web form in VS 2003, usually viewing the code behind for
that form will let you write any method or function and referencing any web
control placed on the form without any problems, for example writing a
function that grabs a string value from a textbox is as easy as saying:
dim str as string = me.TextBox1.Text
but with visual studio 2005 I can't do this in the simple way because the
class for
that form is placed in the app_code folder and it will not see non of the
controls on the web form, so saying:
dim str as string = me.TextBox1.Text will not work and it complains about
the TextBox1 is not defined. in more details, I have a function was working
in visual studio 2003 that calls a stored procedure in sql server 2005, this
function passes a variables (3 variables) from a 3 textboxes on the form.
And I am calling this function everytime the user changes the value of one
of these textboxes.
now since the migration, visual studio 2005 puts all classes under Ap_Code
folder (as one of their new features!!) moving my function under the
App_Code folder prevents me from calling/Getting the values of those
textboxes as they change why? because the class can't see those controls
sitting on the form!
thanks for your help.
when adding a new web form in VS 2003, usually viewing the code behind for
that form will let you write any method or function and referencing any web
control placed on the form without any problems, for example writing a
function that grabs a string value from a textbox is as easy as saying:
dim str as string = me.TextBox1.Text
but with visual studio 2005 I can't do this in the simple way because the
class for
that form is placed in the app_code folder and it will not see non of the
controls on the web form, so saying:
dim str as string = me.TextBox1.Text will not work and it complains about
the TextBox1 is not defined. in more details, I have a function was working
in visual studio 2003 that calls a stored procedure in sql server 2005, this
function passes a variables (3 variables) from a 3 textboxes on the form.
And I am calling this function everytime the user changes the value of one
of these textboxes.
now since the migration, visual studio 2005 puts all classes under Ap_Code
folder (as one of their new features!!) moving my function under the
App_Code folder prevents me from calling/Getting the values of those
textboxes as they change why? because the class can't see those controls
sitting on the form!
thanks for your help.