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

ASP.NET

 
AnswerRe: passing arralist in querystring in asp.net c# Pin
leppie13-Jun-08 21:43
leppie13-Jun-08 21:43 
QuestionPlace your current page path on Label Pin
Rajeshiam13-Jun-08 21:24
Rajeshiam13-Jun-08 21:24 
AnswerRe: Place your current page path on Label Pin
Christian Graus14-Jun-08 3:39
protectorChristian Graus14-Jun-08 3:39 
Questiondrop down list in asp.net 2.0 Pin
vijaylumar13-Jun-08 21:07
vijaylumar13-Jun-08 21:07 
AnswerRe: drop down list in asp.net 2.0 Pin
Anand Desai13-Jun-08 21:22
Anand Desai13-Jun-08 21:22 
QuestionHow a pdf file open in new window Pin
Masood Kochi,SSF13-Jun-08 20:43
Masood Kochi,SSF13-Jun-08 20:43 
AnswerRe: How a pdf file open in new window Pin
Anand Desai13-Jun-08 20:58
Anand Desai13-Jun-08 20:58 
Questionurl rewriting Pin
Pankaj Garg13-Jun-08 18:40
Pankaj Garg13-Jun-08 18:40 
I was trying to rewrite the url.
in the inline code i have the link button with the following tag

<asp:LinkButton CommandArgument='<%#DataBinder.Eval(Container.DataItem,"id")%>' CommandName="magic" ID="l" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"lessonname") %>' NavigateUrl='<%#"editLesson.aspx?id=" + DataBinder.Eval(Container.DataItem,"id")%>'></asp:LinkButton>

after clicking the linkbutton it comes in the gridview rowbound event


Response.Redirect("quotes/page" + e.CommandArgument.ToString() + ".aspx");
then the control goes to
global.asax file in the application begin request function


void Application_BeginRequest(Object sender, EventArgs e)<br />
{<br />
HttpContext context = HttpContext.Current;<br />
<br />
string oldpath = context.Request.Path.ToLower();<br />
string token = "/quotes/page";<br />
int len = token.Length;<br />
<br />
int i = oldpath.IndexOf(token);<br />
if (i != -1)<br />
{<br />
<br />
int j = oldpath.IndexOf(".aspx");<br />
<br />
if (j != -1)<br />
{<br />
<br />
string id =<br />
<br />
oldpath.Substring(i + len, j - (i + len));<br />
string newpath =<br />
<br />
oldpath.Replace(token + id + ".aspx",<br />
<br />
"/editLesson.aspx?id=" + id);<br />
<br />
context.RewritePath(newpath);<br />
<br />
}<br />
}<br />
<br />
}

finally i want to navigate to editlessonpage by the name of virtualdirectory/quotes/page12.aspx
but it remains in the same page , the page where i clicked the linkbutton in the gridview

If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!

QuestionProblem using FillSchema Pin
FerJones13-Jun-08 14:18
FerJones13-Jun-08 14:18 
AnswerRe: Problem using FillSchema Pin
Parwej Ahamad13-Jun-08 18:46
professionalParwej Ahamad13-Jun-08 18:46 
QuestionRe: Problem using FillSchema [modified] Pin
FerJones14-Jun-08 6:09
FerJones14-Jun-08 6:09 
Questionwhat is session () ?? Pin
ahemoudi13-Jun-08 11:07
ahemoudi13-Jun-08 11:07 
AnswerRe: what is session () ?? [modified] Pin
Christian Graus13-Jun-08 16:20
protectorChristian Graus13-Jun-08 16:20 
AnswerRe: what is session () ?? Pin
Masood Kochi,SSF13-Jun-08 19:27
Masood Kochi,SSF13-Jun-08 19:27 
GeneralRe: what is session () ?? Pin
ahemoudi15-Jun-08 7:11
ahemoudi15-Jun-08 7:11 
GeneralRe: what is session () ?? Pin
Masood Kochi,SSF15-Jun-08 19:03
Masood Kochi,SSF15-Jun-08 19:03 
QuestionSidebar Pin
Dan Neely13-Jun-08 5:42
Dan Neely13-Jun-08 5:42 
AnswerRe: Sidebar Pin
ToddHileHoffer13-Jun-08 5:49
ToddHileHoffer13-Jun-08 5:49 
GeneralRe: Sidebar Pin
Dan Neely13-Jun-08 7:05
Dan Neely13-Jun-08 7:05 
QuestionRe: Sidebar Pin
Dan Neely13-Jun-08 7:14
Dan Neely13-Jun-08 7:14 
GeneralRe: Sidebar Pin
Dan Neely13-Jun-08 8:41
Dan Neely13-Jun-08 8:41 
GeneralRe: Sidebar Pin
ToddHileHoffer13-Jun-08 8:58
ToddHileHoffer13-Jun-08 8:58 
GeneralRe: Sidebar Pin
Dan Neely13-Jun-08 9:06
Dan Neely13-Jun-08 9:06 
GeneralRe: Sidebar Pin
ToddHileHoffer13-Jun-08 9:08
ToddHileHoffer13-Jun-08 9:08 
AnswerRe: Sidebar Pin
Dan Neely13-Jun-08 9:13
Dan Neely13-Jun-08 9:13 

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.