嗨Iam在asp.net中的广告控制中出错 [英] hi Iam Getting error in advertisement Control in asp.net

查看:89
本文介绍了嗨Iam在asp.net中的广告控制中出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误





错误1'ASP.default_aspx'不包含'AdRotator1_AdCreated'的定义,也没有扩展方法'AdRotator1_AdCreated '可以找到'ASP.default_aspx'类型的第一个参数(你是否缺少using指令或汇编引用?)E:\ tom \Advertisement\Default.aspx 15

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

推荐答案

检查此答案此处。您的活动可能有问题 AdRotator1_AdCreated



答案是,



让标记生成事件处理程序本身。修复事件处理程序内容。删除代码中的on click事件处理程序及其在标记中的属性。重新键入on click属性in标记,但这次选择从Visual Studio Intellisense创建一个新的事件选项。
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.


第二个错误是





AdRotator AdRotator1找不到AdvertisementFile或文件无效。

在下面输入你的回复并点击提交按钮。







SOl:



你有没有创建广告文件( XML文件)正确的指定格式,



以下是广告文件的格式。



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 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


这篇关于嗨Iam在asp.net中的广告控制中出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆