asp.net - Calling the DirectMethod by passing the String Values as parameters in ConfirmMessage Box Handler -
i trying pass string values direct method using following code.
<html> <head runat="server"> <script runat="server"> protected void btnsubmit_directclick(object sender, ext.net.directeventargs e) { string name = "lewis bland"; string address = "las angels"; x.msg.confirm("confirmation", "do want submit details", new messageboxbuttonsconfig { yes = new messageboxbuttonconfig { handler = "#{directmethods}.fnsavenameandadress(" + name + "," + address + ")", text = "yes" }, no = new messageboxbuttonconfig { text = "no" } }).show(); } [directmethod(namespace = "testalias")] public void fnsavenameandadress(string name, string address) { x.msg.alert("conformed", "name , address submitted successfully").show(); } </script> </head> <body> <form id="form1" runat="server"> <ext:resourcemanager runat="server" id="resource" sourceformatting="true" /> <ext:button id="btnsubmit" runat="server" text="submit" ondirectclick="btnsubmit_directclick" /> </form> </body> </html>
the above code working fine out parameters when pass string parameters didn't fire method. fire method have used "alias" concept reading posts adding following lines
[directmethod(namespace = "testalias")]
and in codebehind have added the following line above class.
[directmethodproxyid(idmode = directmethodproxyidmode.alias, alias = "testalias")]
even though added these, fired event. how overcome scenario.
thank you.
yes = new messageboxbuttonconfig { handler = "#{directmethods}.fnsavenameandadress(" + name + "," + address + ")", text = "yes"
inside code handler should guess,
handler = "testalias.fnsavenameandadress(" + name + "," + address + ")",
Comments
Post a Comment