Hi all
I am very new to ASP.NET and I am still learning the basics and how to use various controls.
I have used the adRotator control and also created the XML File using the coding mentioned below, but when executed in the browser it is showing error message(Which I am posting after the code)
XML FILE:
<?xml version="1.0" encoding="utf-8"?>
<Advertisement>
<Ad>
<ImageUrl> images/Logo.gif</ImageUrl>
<NavigateUrl>http://www.google.co.in</NavigateUrl>
<AlternateTExt> Main </AlternateTExt>
<Keyword>LogoImage</Keyword>
</Ad>
<Ad>
<ImageUrl> images/RedBik.gif</ImageUrl>
<NavigateUrl>http://www.yahoo.co.in</NavigateUrl>
<AlternateTExt> Main2 </AlternateTExt>
<Keyword>RedBikImage</Keyword>
</Ad>
</Advertisement>
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:AdRotator id="AdRotator1"
style="Z-INDEX: 102; LEFT: 32px;
POSITION: absolute; TOP: 32px; height: 222px; width: 883px;"
runat="server" AdvertisementFile="~/myAds.xml">
</asp:AdRotator>
</div>
</form>
</body>
</html>
Please note that I have not written any coding in the file Default.aspx.cs.
The ERROR MESSAGE I am getting in the browser is:
Server Error in '/AdRotatorControl' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.
Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "RemoteOnly". To enable the details to be viewable on remote machines, please set "mode" to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="On" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
Can any one identify the error and please help me out?
Please help me out!
Thanks in advance!