Click here to Skip to main content
15,910,009 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How to Open new aspx page in same window Pin
Samarjeet Singh@india13-Sep-09 21:33
Samarjeet Singh@india13-Sep-09 21:33 
GeneralRe: How to Open new aspx page in same window Pin
Aman Bhullar13-Sep-09 21:39
Aman Bhullar13-Sep-09 21:39 
GeneralRe: How to Open new aspx page in same window Pin
Abhishek Sur13-Sep-09 22:05
professionalAbhishek Sur13-Sep-09 22:05 
GeneralRe: How to Open new aspx page in same window Pin
Aman Bhullar13-Sep-09 22:46
Aman Bhullar13-Sep-09 22:46 
AnswerRe: How to Open new aspx page in same window Pin
Amit Patel198513-Sep-09 21:30
Amit Patel198513-Sep-09 21:30 
GeneralRe: How to Open new aspx page in same window Pin
Samarjeet Singh@india13-Sep-09 22:16
Samarjeet Singh@india13-Sep-09 22:16 
AnswerRe: How to Open new aspx page in same window Pin
Abhishek Sur13-Sep-09 21:35
professionalAbhishek Sur13-Sep-09 21:35 
Questionhow to access user name from url Pin
dipak.dipak13-Sep-09 20:09
dipak.dipak13-Sep-09 20:09 
Dear all,

I want to access user name from the url written like this format

http://www.codeproject.com/username1

user will enter his user name after website name. Remember that user will not enter user name as a query string like

http://www.codeproject.com/username?username1 (I don't want this type of entry with url by user)


when i am using this (http://www.codeproject.com/username1) type of url I have tryed to access user name from global.aspx -Application_BeginRequest event. i have searched that after the website name if the string (here username1) is not with . (i am not permitting to use . while user name created) it will redirect to download page with query string.
like this:

string TheRequestUrl = "";
string theurl = HttpContext.Current.Request.Path;
string theFileName = theurl.Substring(theurl.LastIndexOf("/") + 1);
if (!theFileName.Contains("."))
{
TheRequestUrl += "Download.aspx?requestUser=" + theFileName;
Response.Redirect(TheRequestUrl);
}


It is working properly on the local server. but on the server it redirect to 404 (page not found) page. not running the Application_BeginRequest event.

Than what is the best way to achive this.


Please help me

Dipak

AnswerRe: how to access user name from url Pin
Christian Graus13-Sep-09 20:44
protectorChristian Graus13-Sep-09 20:44 
QuestionRe: how to access user name from url Pin
dipak.dipak13-Sep-09 22:56
dipak.dipak13-Sep-09 22:56 
QuestionJava Script proble Pin
Amit Patel198513-Sep-09 19:55
Amit Patel198513-Sep-09 19:55 
AnswerRe: Java Script proble Pin
Christian Graus13-Sep-09 20:44
protectorChristian Graus13-Sep-09 20:44 
GeneralRe: Java Script proble Pin
Amit Patel198513-Sep-09 20:50
Amit Patel198513-Sep-09 20:50 
GeneralFind out solution Pin
Amit Patel198513-Sep-09 21:21
Amit Patel198513-Sep-09 21:21 
QuestionScroll bar in a checkList box Pin
Swetha Srinivasan13-Sep-09 19:53
Swetha Srinivasan13-Sep-09 19:53 
AnswerRe: Scroll bar in a checkList box Pin
Samarjeet Singh@india13-Sep-09 20:17
Samarjeet Singh@india13-Sep-09 20:17 
AnswerRe: Scroll bar in a checkList box Pin
r a m e s h13-Sep-09 20:30
r a m e s h13-Sep-09 20:30 
AnswerRe: Scroll bar in a checkList box Pin
nimeshmca16-Mar-10 20:48
nimeshmca16-Mar-10 20:48 
Question'top.screenLeft' is null or not an object [modified] Pin
Vijayitsb13-Sep-09 19:49
Vijayitsb13-Sep-09 19:49 
Questionerror after uploading on server Pin
Harry@NewDelhi13-Sep-09 19:47
Harry@NewDelhi13-Sep-09 19:47 
AnswerRe: error after uploading on server Pin
Christian Graus13-Sep-09 20:45
protectorChristian Graus13-Sep-09 20:45 
GeneralRe: error after uploading on server Pin
Harry@NewDelhi13-Sep-09 20:55
Harry@NewDelhi13-Sep-09 20:55 
QuestionAbout HtmlArea.. Pin
lsh486love13-Sep-09 19:13
lsh486love13-Sep-09 19:13 
AnswerRe: About HtmlArea.. Pin
Christian Graus13-Sep-09 19:24
protectorChristian Graus13-Sep-09 19:24 
QuestionPage Pre_Init and Dynamic link buttons Pin
Ersan Ercek13-Sep-09 10:10
Ersan Ercek13-Sep-09 10:10 

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.