Get the value from prompt dialog and save
Hi,
I am using the Ext.Msg.Prompt to accept a value, how can i save it to the database.
my code is as follows:
Code:
Protected Sub btnAddFold(ByVal sender As Object, ByVal e As AjaxEventArgs)
Ext.Msg.Prompt("Folder Name", "Please enter a folder name: ", New JFunction("showResultText")).Show()
End Sub
please guide ????
RE: Get the value from prompt dialog and save
Hi,
Use AjaxMethod. For example, call AjaxMethod in 'showResultText' function and pass the prompt value to the server side.
https://examples1.ext.net/#/Events/A...hods/Overview/
RE: Get the value from prompt dialog and save
I added the keyword before a server side method as: [AjaxMethod]
But, it is coming as error with underline as: Declaration expected, the [AjaxMethod] is not identified by the VS 2008 editor, is there any reference i need to add.
I am already using the following Imports at the top of my page:
Imports Coolite.Ext.Web
please excuse me, as iam new to ajax world and to coolite.
Thanks and Regards,
RE: Get the value from prompt dialog and save
Hi,
If you use VB then you have to use angle brackets for attribute
<AjaxMethod>
RE: Get the value from prompt dialog and save
Hi,
Please provide a sample, i tried but not working.
I followed what you suggested, but it's not working, may be i am not doing what it need to be done.
Code:
<script language="javascript" type="text/javascript" >
var showResultText = function (btn, text) {
Coolite.AjaxMethods.GetFolderName(text);
};
</script>
In the server side code iam doing the following:
<AjaxMethod()> _
Public Sub GetFolderName(ByVal fname As String)
Me.lblFoldName.Text = String.Concat("U entered : ", fname)
End Sub
RE: Get the value from prompt dialog and save
Please help..............
Sample please ........................