Hi guys,
I am loading a Datalist to create the necessary filters (textbox's,dropdown's,checkbox's) for a grid. So far so good, the problem is between postback's. I understand that every time a postback occours I need to recreate the Datalist with the items, but how
can I store the input made by the user on each control?
Imagine that I have created a textbox for filtering a column and the user input "test" on the textbox and click on button that triggers the event to search the value in the gridview.
How can I use (if so) the "viewstate" and when?
Here is the code:
protected void dlFilter_ItemDataBound(object sender, DataListItemEventArgs e)
{
try
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
// Retrieve the Label control in the current DataListItem ...
Go to the complete details ...