Click here to Skip to main content
15,890,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: asp.net without javascript Pin
Sandeep Mewara17-Jun-10 6:34
mveSandeep Mewara17-Jun-10 6:34 
QuestionTab Control in ASP.Net Tooltip Pin
indian14316-Jun-10 11:30
indian14316-Jun-10 11:30 
AnswerRe: Tab Control in ASP.Net Tooltip Pin
Sandeep Mewara17-Jun-10 6:31
mveSandeep Mewara17-Jun-10 6:31 
Questiondispalying an image from sql database without knowing content type Pin
Aptiva Dave16-Jun-10 10:51
Aptiva Dave16-Jun-10 10:51 
AnswerRe: dispalying an image from sql database without knowing content type Pin
Sandeep Mewara17-Jun-10 6:28
mveSandeep Mewara17-Jun-10 6:28 
QuestionError Message Pin
indian14316-Jun-10 10:34
indian14316-Jun-10 10:34 
AnswerRe: Error Message Pin
thatraja16-Jun-10 20:26
professionalthatraja16-Jun-10 20:26 
QuestionImplementing Custom 404 page in ASP.NET Web Form Application using Routing Pin
Nadia Monalisa16-Jun-10 9:05
Nadia Monalisa16-Jun-10 9:05 
Hello,

I learned that, in order to optimize my Web Application for Search Engine, I must implement custom 404 page. But the way Microsoft tell us to implement custom 404 (within Web.Config file), that is not good for SEO. Microsoft says,

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
   <error statusCode="404" redirect="Page-Not-Found.aspx" />
</customErrors>


But when the page is not found, IIS issue 302 redirect to Page-Not-Found.aspx page which is not good. So, I implemented custom 404 page using Routing technique that is available in ASP.NET 3.5 SP1 and 4.0. I used the following router in Global.asax page,

routes.MapPageRoute("404", "{*url}", "~/Page-Not-Found.aspx");


And amazingly it works. I just cant believe it was so that easy. So far I understand, Routing does not issue 302 redirect, so the first purpose is served. But how can I make sure that, when Page-Not-Found.aspx page is shown, Not Http 200 status, rather Http 400 status is issued. I placed this code in the Page_Init method of my Page-Not-Found.aspx page,

protected void Page_Init(object sender, EventArgs e)
{
   Response.StatusCode = 404; 
}


But I am not sure if that will solve the problem or not. Will the page send Http 200 status code to the Browser before this 404 code ? If so, then, the purpose wont be served. So, please help me with the answer, How can I enfore the status code 400 in the Page-Not-Found.aspx so that Http 200 code is NEVER sent to the browser ?
QuestionDesign-time render error for CompositeControl Pin
Fayu16-Jun-10 5:38
Fayu16-Jun-10 5:38 
Questionow to find Textbox ID's binded inside Grid view Pin
Satish_S16-Jun-10 1:22
Satish_S16-Jun-10 1:22 
AnswerRe: ow to find Textbox ID's binded inside Grid view Pin
meeram39516-Jun-10 1:26
meeram39516-Jun-10 1:26 
GeneralRe: ow to find Textbox ID's binded inside Grid view Pin
Satish_S16-Jun-10 1:35
Satish_S16-Jun-10 1:35 
AnswerRe: ow to find Textbox ID's binded inside Grid view Pin
shreekar17-Jun-10 3:51
shreekar17-Jun-10 3:51 
Questiondisplay column headers vertically Pin
priyagee16-Jun-10 0:43
priyagee16-Jun-10 0:43 
QuestionHow to use _dopostabck() in ajax tab container Pin
sudheera p16-Jun-10 0:36
sudheera p16-Jun-10 0:36 
QuestionPayPal problem Pin
Yoyosch16-Jun-10 0:02
Yoyosch16-Jun-10 0:02 
AnswerRe: PayPal problem Pin
Adam R Harris16-Jun-10 4:58
Adam R Harris16-Jun-10 4:58 
QuestionRe: PayPal problem [modified] Pin
chayanban29-Dec-10 1:42
chayanban29-Dec-10 1:42 
QuestionContentPlaceHolder [modified] Pin
eslam soliman15-Jun-10 23:50
eslam soliman15-Jun-10 23:50 
AnswerRe: ContentPlaceHolder Pin
Sandeep Mewara16-Jun-10 0:21
mveSandeep Mewara16-Jun-10 0:21 
GeneralRe: ContentPlaceHolder Pin
eslam soliman16-Jun-10 1:06
eslam soliman16-Jun-10 1:06 
AnswerRe: ContentPlaceHolder Pin
KingHau16-Jun-10 21:15
KingHau16-Jun-10 21:15 
GeneralRe: ContentPlaceHolder Pin
eslam soliman16-Jun-10 22:57
eslam soliman16-Jun-10 22:57 
GeneralRe: ContentPlaceHolder Pin
KingHau17-Jun-10 0:38
KingHau17-Jun-10 0:38 
GeneralRe: ContentPlaceHolder Pin
eslam soliman22-Jun-10 1:41
eslam soliman22-Jun-10 1:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.