easy points - best way to modify select statement contained in the #region Web Form Designer generated code
Posted on 2005-05-05
I'm working in asp.neet using c#
my form has a select statement in the section:
#region Web Form Designer generated code
this.odbcSelectCommand1.CommandText = "SELECT LIST.* FROM LIST WHERE userID = 2";
I need to alter the where statement programatically.
Should I just mess with that string and build what I need, or is there another way of doing it that overrides the web form generated code -
in otherwords, I know I can do something like
this.odbcSelectCommand1.CommandText = "SELECT LIST.* FROM LIST WHERE userID = " + varUserId ;
but what I need to know is - is this the best or "right" way to do it?
for that matter I'm pretty new to ASP.net and C# - can I just specify the whole thing in my code? which would take precidence?
I'm working on this right now -so if someone can give a good answer - you'll likely get the points today.