Why do I get a blank image when I set the KeywordFilter property of the AdRotator
If the KeywordFilter property of the AdRotator control is set to a keyword that does not correspond to any element in the Advertisement file then you may get a blank image. Here is some code that should work properly. <asp:AdRotator id='AdRotator1' AdvertisementFile='adrot.xml' runat='server' Width='468px' KeywordFilter ='book' Height='60px'></asp:AdRotator> adrot.xml <Advertisements> <Ad> <ImageUrl>b2346.jpg</ImageUrl> <NavigateUrl>http://ww.syncfusion.com</NavigateUrl> <AlternateText> The site for ASP.Net FAQs </AlternateText> <Impressions>5</Impressions> <Keyword>book</Keyword> </Ad> </Advertisements>
How to check if nothing is selected in a CheckBoxList without using a loop to parse through all the items
You can check if CheckBoxList.SelectedIndex equals to -1 which means nothing is selected.
How to write the data from database into an XML file
VB.NET ’Fill the DataSet ds.WriteXml(Server.MapPath ('products.xml' ) ) C# //Fill the DataSet ds.WriteXml(Server.MapPath ('products.xml' ) ); Note : Make sure you have write and modify rights.
How can I have a particular Web page in an ASP.NET application which displays its own error page.
This can be done by setting the ErroPage attribute of Page Directive or ErrorPage property of Page Class to the desired Custom Error Page <%@Page Language='C#' ErrorPage='specificerropage.htm'%> In web.config <customErrors mode='On' />
Can I use custom .NET data types in a Web form?
Yes. Place the DLL containing the type in the application root’s bin directory and ASP.NET will automatically load the DLL when the type is referenced. This is also what happens when you add a custom control from the toolbox to your web form.