Hi all,
I have a FormView (id=fv) control and a html textbox (id=txt). I want
to display data based on value of the textbox. I tried to use the
following code but it doesn't work :
<script type="text/javascript">
function ChangeData()
{
test.LoadData(document.getElementById("txt").value);
}
</script>
the behind code :
dim strDeptCode as string
.....................
.....................
<AjaxMethod()> _
Public Sub LoadData(byVal DeptCode as string)
strDeptCode = DeptCode
fv.DataBind()
End Sub
Protected Sub fv_DataBinding(ByVal sender As Object, ByVal e As
System.EventArgs) Handles fv.DataBinding
If strDeptCode = "" Then
dsDept.SelectParameters("DeptCode").DefaultValue = "all"
Else
dsDept.SelectParameters("DeptCode").DefaultValue =
strDeptCode
End If
End Sub
I found that the last procedure never been executed except when page
1st loading.
How to solve it?
many-many thanks,
Samuel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info/
Don't forget to read my blog at http://weblogs.asp.net/mschwarz/
The open source project is now located at
http://www.codeplex.com/Wiki/View.aspx?ProjectName=AjaxPro
-~----------~----~----~----~------~----~------~--~---