c# - Fails to use Azure caching in my web app -
in webpage, should display gridview table records, i've tried add cache grid records cache, if exists, , if not go db itself.
though when load page error:
could not load file or assembly 'microsoft.windowsazure.serviceruntime, version=2.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' or 1 of dependencies. system cannot find file specified.
here's code, i'll glad recieve possible help:
protected void page_load(object sender, eventargs e) { //if (page.ispostback) datacache cache = new datacache("default"); dataset result = (dataset) cache.get("table"); if (result == null) { string connstring = sqlazuredatasource.connectionstring; sqldataadapter adp = new sqldataadapter("select * students", connstring); dataset ds = new dataset(); adp.fill(ds); cache.put("table", ds); gridview1.datasource = ds; gridview1.databind(); } else { gridview1.datasource = result; gridview1.databind(); } }
Comments
Post a Comment