![]() |
| ||
| Use variable from the code behind I am using this variable from the code behind : public string UserID; //globally declare the UserId I am trying to use the variable in the INSERT command in the aspx file but it seems that the following command does not work,any ideas why? InsertCommand="INSERT INTO table (column1, column2) VALUES (value1, '<%=UserID %>')" Thanks! Reply |
| ||
| Re: Use variable from the code behind it seems ok, but if i were you, i would create a class for data access, and create 4 methods to select insert update and delete data, then use objectdatasource object to use those methods, so you dont have to bother with aspx and code behind thing. there is a good video tutorial on asp.net as to how to use objectdatasource efficiently. |
| All times are GMT -4. The time now is 3:18 am. |
Forum system based on vBulletin Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©2003 - 2010 DaniWeb® LLC