This tool generate backlinks on appr. 100 websites for a given website, but it shows the result after all backlink generation completed. We want to show the result for every backlink generation is done.
This tool generate backlinks on appr. 100 websites for a given website, but it shows the result after all backlink generation completed. We want to show the result for every backlink generation is done.
As far as I know, you can't update the UpdatePanel when every label is added. The UpdatePanel will update when all generations complete. The reason is that this is a single-threaded.
Best wishes,
Please mark the replies as answers if they help or unmark if not.
Feedback to us
afsarsal_yah...
Member
52 Points
23 Posts
dynamically adding controls to page
Oct 31, 2012 03:46 PM|LINK
Hello,
I'm trying to add controls to page without postback with ajax.
The following code works but it adds the controls at once not one by one. I want that it dynamically adds and show the controls.
I've seen several php sites that dynamically refresh the page content one by one without postback.
C# code:
protected void Button1_Click(object sender, EventArgs e)
{
System.Net.WebClient c = new System.Net.WebClient();
for (int i = 0; i < 10; i++)
{
string result = c.DownloadString("http://www.gmail.com");
Label lbl = new Label();
lbl.ID = "lbl" + i.ToString();
lbl.Text = "lbl" + i.ToString();
UpdatePanel1.ContentTemplateContainer.Controls.Add(lbl);
UpdatePanel1.Update();
System.Threading.Thread.Sleep(500);
}
}
HTML code:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
</ContentTemplate>
</asp:UpdatePanel>
We need this because In our free seo tools website we have several tools that we need to show the results to users dynamically.
You may see a page that we want to work this way, http://www.onlineseoanalyzer.com/Free-SEO-Tools/Free-Backlink-Generator.aspx
This tool generate backlinks on appr. 100 websites for a given website, but it shows the result after all backlink generation completed. We want to show the result for every backlink generation is done.
chetan.sarod...
All-Star
65749 Points
11148 Posts
Re: dynamically adding controls to page
Nov 01, 2012 03:30 AM|LINK
Refer this
http://msmvps.com/blogs/luisabreu/archive/2007/02/15/adding-controls-to-an-updatepanel-through-code.aspx
http://forums.asp.net/t/1808438.aspx/1
http://forums.asp.net/t/1474986.aspx/1
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Catherine Sh...
All-Star
23372 Points
2490 Posts
Microsoft
Re: dynamically adding controls to page
Nov 07, 2012 01:25 AM|LINK
Hi,
As far as I know, you can't update the UpdatePanel when every label is added. The UpdatePanel will update when all generations complete. The reason is that this is a single-threaded.
Best wishes,
Feedback to us
Develop and promote your apps in Windows Store