Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
error


Error 1 'ASP.default_aspx' does not contain a definition for 'AdRotator1_AdCreated' and no extension method 'AdRotator1_AdCreated' accepting a first argument of type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?) E:\mine\Advertisement\Default.aspx 15
Posted

Check this answer here. You may having problem with your event AdRotator1_AdCreated

The answer says,

Let the mark up generate the event handler itself.Back up your event handler contents.Delete the on click event handler in the code behind and its attribute in the markup.Retype the on click attribute in the mark up but this time choose the create a new event option from Visual studio Intellisense.
 
Share this answer
 
v2
Comments
harshavardhan12345678 8-Aug-14 0:53am    
Error 1 The type or namespace name 'AdRotator' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?) E:\mine\Advertisement\Default.aspx.cs 11 21 Advertisement
Dilan Shaminda 8-Aug-14 1:07am    
it looks like you are missing the reference to AdRotator
Dilan Shaminda 8-Aug-14 1:25am    
is the error you posted as the question solved?
harshavardhan12345678 8-Aug-14 1:05am    
And 2nd error is


The AdRotator AdRotator1 could not find the AdvertisementFile or the file is invalid.
Dilan Shaminda 8-Aug-14 1:10am    
check your xml file.There may be an issue with your file
And 2nd error is


The AdRotator AdRotator1 could not find the AdvertisementFile or the file is invalid.
Enter your reply below and click the Submit button.



SOl:

have you create the Advertisement file (XML File) correctly in specified format,

following is the format of Advertisement file.

XML
<?xml version="1.0" encoding="utf-8" ?>
<Advertisements>
  <Ad>
  <ImageUrl>~/itc.jpg</ImageUrl>
  <NavigateUrl>http://www.itfunda.com/aspnet-ajax-ebook/show/46  </NavigateUrl>
  <AlternateText> Go To Asp.net Ajax ebook </AlternateText>
    <width>300</width>
    <Height>300</Height>
    <impression>30</impression>
    <keyword>Asp.net Ajax ebook</keyword>
  </Ad>
  <Ad>
  <ImageUrl>~/itcfunda.jpg</ImageUrl>
  <NavigateUrl>http://www.itfunda.com/jquery-how-to-ebook/show/45  </NavigateUrl>
  <AlternateText> Go To Jquery ebook + video + sourcecode </AlternateText>
    <width>300</width>
    <Height>300</Height>
    <impression>20</impression>
    <keyword>jquery</keyword>
 </Ad>
  <Ad>
  <ImageUrl>~/itcj.jpg</ImageUrl>
  <NavigateUrl>http://www.itfunda.com/jquery-essentials-online-training/show/41</NavigateUrl>
  <AlternateText> Go To jquery essential training </AlternateText>
    <width>300</width>
    <Height>300</Height>
    <impression>10</impression>
    <keyword>jquery</keyword>
  </Ad>
</Advertisements>



post your code instead of posting errors
 
Share this answer
 
Comments
harshavardhan12345678 8-Aug-14 1:18am    
Error 1 'ASP.default_aspx' does not contain a definition for 'AdRotator1_AdCreated' and no extension method 'AdRotator1_AdCreated' accepting a first argument of type 'ASP.default_aspx' could be found (are you missing a using directive or an assembly reference?) E:\mine\Advertisement\Default.aspx 15
Dilan Shaminda 8-Aug-14 1:24am    
you are posting errors without posting your coding.How we can help you? we can't predict your code.
harshavardhan12345678 8-Aug-14 3:08am    
The AdRotator AdRotator1 could not find the AdvertisementFile or the file is invalid.
harshavardhan12345678 8-Aug-14 1:27am    
No No Issue is nOt Solved
ClimerChinna 8-Aug-14 1:45am    
add below function to your CS file

protected void AdRotator1_AdCreated(object sender, AdCreatedEventArgs e)
{

}

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