Click here to Skip to main content
16,004,991 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionPlease I need your help in asp.net Pin
abglorie27-Nov-07 20:14
abglorie27-Nov-07 20:14 
AnswerRe: Please I need your help in asp.net Pin
AS@1327-Nov-07 20:23
AS@1327-Nov-07 20:23 
GeneralRe: Please I need your help in asp.net Pin
abglorie27-Nov-07 22:19
abglorie27-Nov-07 22:19 
AnswerRe: Please I need your help in asp.net Pin
Prateek G27-Nov-07 21:19
Prateek G27-Nov-07 21:19 
AnswerRe: Please I need your help in asp.net Pin
Vasudevan Deepak Kumar27-Nov-07 21:30
Vasudevan Deepak Kumar27-Nov-07 21:30 
AnswerRe: Please I need your help in asp.net Pin
Anusubha.V.G28-Nov-07 0:44
Anusubha.V.G28-Nov-07 0:44 
AnswerForum Guidelines Pin
leckey28-Nov-07 4:31
leckey28-Nov-07 4:31 
QuestionURL Rewriting Pin
Jintal Patel27-Nov-07 20:00
Jintal Patel27-Nov-07 20:00 
hii

i have change my url name according to my requirment using global file concept

this is my function
void Application_BeginRequest(Object sender, EventArgs e)
{
String strCurrentPath;
String strCustomPath;
String StrReferrer;



if (Request.UrlReferrer != null)
StrReferrer = Request.UrlReferrer.PathAndQuery.ToString();
else
StrReferrer = "";

// for SubCategory

strCurrentPath = Request.Path;
strCurrentPath = strCurrentPath.ToLower().Replace("/RedTag/Client/".ToLower(), "");

if (strCurrentPath.StartsWith("subcategory.aspx"))
{
strCurrentPath = StrReferrer;
strCurrentPath = strCurrentPath.ToLower().Replace("/RedTag/Client/".ToLower(), "");
}

if (strCurrentPath.StartsWith("c-"))
{
string id = strCurrentPath.Split('-')[1].ToString();
strCustomPath = "category.aspx?catid=" + id.ToString();
Context.RewritePath(strCustomPath);

}
if (strCurrentPath.StartsWith("m-"))
{
string id = strCurrentPath.Split('-')[1].ToString();
strCustomPath = "subcategory.aspx?MFRID=" + id.ToString();
Context.RewritePath(strCustomPath);
}
if (strCurrentPath.StartsWith("s-"))
{
string id = strCurrentPath.Split('-')[1].ToString();
strCustomPath = "SubCategory.aspx?catid=" + id.ToString();
HttpContext.Current.RewritePath(strCustomPath);
// Context.RewritePath(strCustomPath);
}
if (strCurrentPath.StartsWith("p-"))
{
string id = strCurrentPath.Split('-')[1].ToString();
strCustomPath = "ItemPage.aspx?ProductID=" + id.ToString();

Context.RewritePath(strCustomPath);
}
}


now problem is that first time when my subcategory page load that time the url is like Client/s-1001-Data.aspx but when i do paging then my page is ispostback and my url change to SubCategory.aspx?catid=1001 means which is in
my Context.RewritePath ..i want the same url name should maintain through out the page...

Jintal Patel

Questionview in Excel Pin
niki_nilu27-Nov-07 19:48
niki_nilu27-Nov-07 19:48 
GeneralRe: view in Excel Pin
AS@1327-Nov-07 20:02
AS@1327-Nov-07 20:02 
GeneralRe: view in Excel Pin
niki_nilu27-Nov-07 22:03
niki_nilu27-Nov-07 22:03 
GeneralRe: view in Excel Pin
Prateek G27-Nov-07 22:10
Prateek G27-Nov-07 22:10 
GeneralRe: view in Excel Pin
niki_nilu27-Nov-07 23:57
niki_nilu27-Nov-07 23:57 
GeneralRe: view in Excel Pin
niki_nilu28-Nov-07 1:03
niki_nilu28-Nov-07 1:03 
GeneralRe: view in Excel Pin
Prateek G28-Nov-07 1:10
Prateek G28-Nov-07 1:10 
GeneralRe: view in Excel Pin
Prateek G28-Nov-07 1:15
Prateek G28-Nov-07 1:15 
GeneralRe: view in Excel Pin
niki_nilu29-Nov-07 20:07
niki_nilu29-Nov-07 20:07 
QuestionIs ASP.net with typed dataset safe from SQL injection ? [modified] Pin
Luay.Essa27-Nov-07 19:40
Luay.Essa27-Nov-07 19:40 
Questionproblem in join query in access database Pin
Ravi_2127-Nov-07 19:36
Ravi_2127-Nov-07 19:36 
AnswerRe: problem in join query in access database Pin
Prateek G27-Nov-07 21:25
Prateek G27-Nov-07 21:25 
QuestionCan anyone tell me about the Satellite assembly? Pin
Ganesan Sankaran27-Nov-07 18:45
Ganesan Sankaran27-Nov-07 18:45 
AnswerRe: Can anyone tell me about the Satellite assembly? Pin
_AK_27-Nov-07 18:53
_AK_27-Nov-07 18:53 
AnswerRe: Can anyone tell me about the Satellite assembly? Pin
John-ph27-Nov-07 19:06
John-ph27-Nov-07 19:06 
Questioninsert or update records in the gridview Pin
subbu.sk27-Nov-07 18:31
subbu.sk27-Nov-07 18:31 
AnswerRe: insert or update records in the gridview Pin
_AK_27-Nov-07 18:35
_AK_27-Nov-07 18:35 

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.