.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
sir this code performs well on other system but in my system it does display output when clicked on button
when i clicked on button it displays same as the design in the page like dynamic template with button displays on button clicked
Please show me your latest code?
Have you encountered any error messages? please try to debug you code.
Best regards,
Sam
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
public static String GetData()
{
return "Today is " + DateTime.Now.ToLongDateString();
}
I tested your code and it works normally on my side.
Please set a breakpoint to debug your code, when you click the button, check whether GetData() is triggered.
Best regards,
Sam
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
19 Points
84 Posts
dynamically populate control does not work?
Jul 24, 2020 06:55 AM|sanam13|LINK
Hlo Professionals!
I am executing the dynamic populate control but in output it does not work. I want to get date on button click but its not working.
Here Is my code
Please execute it.
Contributor
3370 Points
1409 Posts
Re: dynamically populate control does not work?
Jul 24, 2020 09:24 AM|samwu|LINK
Hi sanam13,
This is caused by the postback after the Button is clicked. You can try to use the input button.
<asp:ScriptManager ID="Script1" runat="server"></asp:ScriptManager> <h3>Dynamic Populate</h3> <input id="Button5" type="button" value="Get Date" /><br /><br /> <asp:Label ID="Label2" runat="server"></asp:Label> <ajaxToolkit:DynamicPopulateExtender ID="Label2_DynamicPopulateExtender" runat="server" PopulateTriggerControlID="Button5" ClientIDMode="Static" TargetControlID="Label2" ServiceMethod="GetData" />
The result:
Best regards,
Sam
Member
19 Points
84 Posts
Re: dynamically populate control does not work?
Jul 28, 2020 09:22 AM|sanam13|LINK
sir this code performs well on other system but in my system it does display output when clicked on button
when i clicked on button it displays same as the design in the page like dynamic template with button displays on button clicked
sir where is the problem in my code
Contributor
3370 Points
1409 Posts
Re: dynamically populate control does not work?
Jul 28, 2020 09:40 AM|samwu|LINK
Hi sanam13,
Please show me your latest code?
Have you encountered any error messages? please try to debug you code.
Best regards,
Sam
Member
19 Points
84 Posts
Re: dynamically populate control does not work?
Jul 28, 2020 10:16 AM|sanam13|LINK
Contributor
3370 Points
1409 Posts
Re: dynamically populate control does not work?
Jul 29, 2020 01:56 AM|samwu|LINK
Hi sanam13,
I tested your code and it works normally on my side.
Please set a breakpoint to debug your code, when you click the button, check whether GetData() is triggered.
Best regards,
Sam