Click here to Skip to main content
15,888,293 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i control my advertisement from admin panel by admin user, i mean admin user can change the advertisements according to their choice from admin panel and post advertisement on anywhere on page when select a field.

like if admin select header then ad shows on a header part.
if admin select a middle part of the page than ad shows on a middle part.
if admin select footer than ad shows on a footer part of the website.

i have a given a dropdown list to the admin in admin panel for select these option.

What I have tried:

i have used these codes to built a advertisement on my website..
C#
<asp:scriptmanager id="scriptmanager1" runat="server"></asp:scriptmanager>
<asp:timer id="timer1" runat="server" interval="2000"></asp:timer>
<asp:updatepanel id="updatepanel1" runat="server">
     <triggers>
        <asp:asyncpostbacktriggers controlid="timer1" eventname="tick"/>
     <triggers>
     <contenttemplate>
         <asp:adrotator id="adrotator1" runat="server" 
          advertisementfile="~/advertisement.xml"/>
     </contenttemplate>
</asp:updatepanel>


here is my xmlfile for change the advertisement on webpage..
<?xml version="1.0" encoding="utf-8" ?>
<Advertisements>
   <Ad>
      <ImageUrl>~/admages/magnifying-glass-76520_1280.png</ImageUrl>
      <NavigateUrl>http://www.google.com</NavigateUrl>
      <AlternateText>
         please visit google.com
      </AlternateText>
      <Impressions>20</Impressions>
      <Keyword>google</Keyword>
   </Ad>

   <Ad>
      <ImageUrl>~/admages/youtube-2712573_1280.png</ImageUrl>
      <NavigateUrl>http://www.youtube.com</NavigateUrl>
      <AlternateText>please visit youtube.com</AlternateText>
      <Impressions>30</Impressions>
      <Keyword>google</Keyword>
   </Ad>
  
</Advertisements>


but i want to change this advertisement from admin panel by admin user..
i have designed a page in admin panel by using 3 textboxes and one submit button.
Banner Url Textbox1
Link To Textbox2
Alternate Text Textbox3

submit button

but the problem is i have no idea how can i do this, if anyone have a solution about this please help me as soon as possible and thanks in advance
Posted
Comments
ZurdoDev 3-Apr-20 10:49am    
You probably need to have a second xml file with ads and then load the proper xml file programatically.
Member 14743579 5-Apr-20 15:44pm    
how can i give a complete power to the admin to change the advertisement like change image, link and block any ads on a page if you have an idea about it than please help me as soon as possible

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