Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi.

I want to create an ad banner using .Net which can be easily implemented in any web site and should provide proper server side functionality (Country - State - City selection from our server using WCF). What should be the best way to do it considering the site where we put the ad banner on could be created using any server side technology.
Posted

You can add controls dinamically on serverside.

On serverside you have to find first of all your placeholder. (for example: div, form)
After you can call your webservice and change the city and the other variables.
And the end of the process you can add a new LiteralControl to your placeholder.

You can use this as the follows:
C#
Control myPlaceHolder = FindControl("form1");

String City = "your city";

String yourBanner = "<asp:label runat=server id=\"yourBannerLabel\" text="\" + City + "\"></asp:label>";

myPlaceHolder.Controls.Add(new LiteralControl(yourBanner));


I hope I could help you! Let me know if something is missing.
 
Share this answer
 
v4
I have no control over the site where the ad banner is going to be placed. It could be an ASP.Net, php or ASP site.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900