Ext.Net : How to Invoke the DirectMethod by passing the String Values in ConfirmMessage Box.

Posted by Avgsnaidu under ASP.NET on 8/16/2013 | Points: 10 | Views : 3103 | Status : [Member] | Replies : 0
I am using Ext.net Controls.
I am trying to pass the string values to Direct Method by using the following code.
<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 you want to submit the Details", new MessageBoxButtonsConfig
Yes = new MessageBoxButtonConfig
Handler = "#{DirectMethods}.fnSaveNameAndAdress(" + Name + "," + Address + ")",
Text = "Yes"
No = new MessageBoxButtonConfig
Text = "No"

[DirectMethod(Namespace = "TestAlias")]
public void fnSaveNameAndAdress(string Name, string Address)
X.Msg.Alert("Conformed", "Name and Address Submitted").Show();

<form id="form1" runat="server">
<ext:ResourceManager runat="server" ID="resource" SourceFormatting="true" />
<ext:Button ID="btnSubmit" runat="server" Text="Submit" OnDirectClick="btnSubmit_DirectClick" />

The above code working fine with out any parameters but when i pass string parameters it didn't fire the Method.

To fire this method i have used "Alias" Concept by reading the posts by adding the following lines
[DirectMethod(Namespace = "TestAlias")] 

and In CodeBehind i have added the the following line above the Class.
[DirectMethodProxyID(IDMode = DirectMethodProxyIDMode.Alias, Alias = "TestAlias")]

Even though i added these, it does fired any Event.
How to overcome this scenario.

Thank you.

V G S Naidu


(No response found.)

Login to post response