May 21, 2012, 1:43 PM
2.0 BETA ExtraParam added in codebehind not being added to service call
Hi,
I'm developing a small webpage but when i try to add an extra parameter to a JSON proxy from code behind it doesn't seem to update the parameter in the request.
Can someone offer me any insight?
I'm developing a small webpage but when i try to add an extra parameter to a JSON proxy from code behind it doesn't seem to update the parameter in the request.
Can someone offer me any insight?
//Get Json Postback Values and put in string
String JsonRequest = e.ExtraParams["Values"];
//Deserialize String And Put values into instance of object
JavaScriptSerializer serializer = new JavaScriptSerializer();
IList<SiteVisit> SiteVisits = new JavaScriptSerializer().Deserialize<IList<SiteVisit>>(JsonRequest);
//Build New Store Parameter
var StoreParam = new Ext.Net.StoreParameter("VisitorID", SiteVisits[0].VisitorID.ToString(), ParameterMode.Value, false);
//Set instance of Store that you want to ammend
var store = this.PreviousVisitsTabPanel.GetStore();
//Add pre-generated Parameter To Store
store.Parameters.Add(StoreParam);
//Bind Changes To Store
store.DataBind();
//Show tab panel
this.PreviousVisitsTabPanel.Show();
//Reload store
store.Reload();
Last edited by craigymcm; May 21, 2012 at 1:45 PM.
Reason: Spelling Mistakes