To avoid this problem you have to minimized depend on other websites as possible as you can
Have you ever tried to find an control using Page.FindControl() method in case that this page have a masterpage? if you answer is no, please try it and you will discover that this method won’t return any object, actually there is no direct way to make this.
Although the control is found in the page, ASP.NET consider that the control is located on the content placeholder control of the master page, so you have to get this control using the content place holder of the masterpage not the content control on the current page as following
You can use the name space System.ServiceModel.Syndication in assembly System.ServiceModel which is added by default to new ASP.NET website project based on .net framework 4.0 ( I didn’t try it with .net framework 3.5 ).
Following is the code to view RSS to one channel called MyFeed and has items Hello1, Hello2 and Hello 3
1 – Create new aspx page
2 – Add the following code to its code behind in the page load handler
//Prepare the channel
Uri uri = new Uri(“http://helloworld”);
List<SyndicationItem> items = new List<SyndicationItem>();
for(int i = 0 ; i < 3 ; i ++)
SyndicationItem item = new SyndicationItem();
item.Title = new TextSyndicationContent(“hello”+ i);
SyndicationFeed fe = new SyndicationFeed(“my feed”,”my description”,uri);
fe.Items = items;
//Add the RSS to the response
Response.ContentType = “application/rss+xml”;
Rss20FeedFormatter formater = new Rss20FeedFormatter(fe);
XmlWriter writer = XmlWriter.Create(Response.Output, null);
3 – View it in you browser or try to add it to your outlook to see the charm of creating RSS with a little effort 🙂
To do this Add a custom validator to your drop down like that
<asp:DropDownList ID="_districtDropDownList" runat="server" ></asp:DropDownList>
<asp:CustomValidator ID="_districtCustomValidator" runat="server"
ErrorMessage="error message" ControlToValidate="_districtDropDownList"
function SelectTypeValidator(sender, args)
if (args.Value == "-1")
args.IsValid = false;
else args.IsValid = true;
To avoid using of the ValidatorEnable method to disable required field validator at some cases on textbox control I decided to use custom validator as a required field just like the following:
<asp:CustomValidator ID="_examDateCustomValidator" runat="server" Text="*"
function CustomValidateDDL(sender, args)
if (args.Value == "")
args.IsValid = false;
args.IsValid = true;
unfortunatily I found that this method is working well if I compare the value with any other value except empty text
Add the following code following code to your page and replace the commented line with your code
function EndRequestHandler(sender, args)
if (args.get_error() == undefined)
//Add the method which must run after postback here