how to bind data with dropdownlist using cache

Posted by Madhuri123 under C# on 7/30/2011 | Points: 10 | Views : 4712 | Status : [Member] | Replies : 1
Hi,what is the code to bind the dropdownlist using Cache Memory.


try
{
objadminfields.Flag = "IS";
ds = objadminfields.state();

{
ddlstate.DataSource = ds.Tables[0];
ddlstate.DataTextField = "StateName";
ddlstate.DataValueField = "StateId";
ddlstate.DataBind();
}
ddlstate.Items.Insert(0, "----Select State----");
}
catch (Exception ex)
{
LblState.Text = ex.Message;
}


How to bind the dropdownlist using state management(cache)

in this case what is the use of cache


Thanks InAdvance,
T.Madhuri.




Responses

Posted by: SheoNarayan on: 7/30/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Hi Madhuri,

Read this article http://www.dotnetfunda.com/articles/article1382-how-to-implement-sql-caching-in-aspnet-poll-based-sql-cache-dependency-.aspx, little lengthy but its good to understand the caching concept.

Read this article, it has exactly the same scenario as your. In this the data is getting populated into the GridView and in your case you need to populate the data in the DropDownList.

http://www.itfunda.com/how-to-store-data-into-cache-and-retrieve-it/Free/206

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Madhuri123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response