How do I get the value in my code behind. So, that I can use it on my aspx page? I tried:
private int lastval;
public int LastVal { get { return lastval; } }
Then I will use it in gridview like this:`
SelectCommand="SELECT * FROM [Order] where OrderId='<%=LastVal %>'"
But, it doesn't get the data.