|
Rank: Member Groups: Member
Joined: 9/28/2007 Posts: 20
|
Hi,
I want to execute some client side script, as a result of processing on server. If I do not find any data for selected parameters, I have to alert user "No Data Found". I know, I can use "ClientSideAfterUpdate" property for doing this. But I want to know, the return value from server side. Is there any way or any object where in data is returned from server side, which I can catch at client side?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You can handle ClientSideAfterExecute and save the third parameter, which is a value that you can passed to from the server side: http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Global.callback_after_execute_handler.htmlOnce you save that value, you can then check it inside your ClientSideAfterUpdate handler. Thanks
|
|
Rank: Member Groups: Member
Joined: 9/28/2007 Posts: 20
|
Hi,
I am using ClientSideAfterExecute attribute of "CallBackPanel" as client side event handler.
I want to read information returned by a second parameter, because that is where my actual value is getting updated. I have placed an hidden variable in this callbackpanel, and at server side, I am changing the value of this variable. Can you please let me know, how to read this variable value? I am getting a string for secod parameter. I can do a substring, but want to know, if there is any sophisticated way.
I also tried using the third parameter. I created a public property and assigned the value. But the value set at server side is not getting reflected for this property. Can you please also, let me know the correct way of transferring value to client side using "property" approach?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Venkat wrote:I want to read information returned by a second parameter, because that is where my actual value is getting updated. I have placed an hidden variable in this callbackpanel, and at server side, I am changing the value of this variable. Can you please let me know, how to read this variable value? I am getting a string for secod parameter. I can do a substring, but want to know, if there is any sophisticated way. No. Venkat wrote:I also tried using the third parameter. I created a public property and assigned the value. Please refer to the document link posted above. It already explained where the value comes from.
|
|
Rank: Member Groups: Member
Joined: 9/28/2007 Posts: 20
|
Hi, I read the document link which you mentioned. But i am getting an error while using the Data property of CallbackEventArgs. Could you please tell if this is right way of declaring. Please help. I am getting this err "use of unassigned local variable ab".
EO.Web.CallbackEventArgs ab; ab.Data = "NO";
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You are way too much off. An event argument class such as CallbackEventArgs is only supposed to be used inside an event handler. You can only pass data to the client side from the CallbackPanel's Execute event handler, which already defines a CallbackEventArgs argument for you.
Thanks
|
|