.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Querystrings in remapped URL's

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :ASP.Net

 Hello everyon and thanks for your help in advance.  I amworking on an application that utilizes URL remapping.  For example, the page /content/this_is_my_article remaps to ~/content.aspx.  This works fine, however, I am in need of passing other parameters in the URL such as /content/this_is_my_article/?PageNumber=3.  However, when I try to retrieve the page number using Request.Querystring("PageNumber"), the request retrives nothing.  I am not sure why this is happening or how to pass the parameters.  Any help would be greatly appreciated.

View Complete Post

More Related Resource Links

Formating Querystrings

On the SentItems.aspx
public enum Mode
   InboxPage = 1,
   DeletedPage = 2,
   SentPage =3

Protect void SentGrid_RowDataBound(object sender, GridViewRowEventArgs e)
   Gridview gv = (Gridview) sender;
   GridviewRow gvRow = e.Row;

   if(gvRow.RowIndex >= 0)
      string.Format("ViewMessage.aspx?Mode={0}", Mode.Sent);
      ///Other stuff

on the ViewMessage.aspx

// here's where I'm have trouble

private void GetMode(int messageMode)
   if(Request["mode"] != null)
       what is next thing to do???

How do I get my string??? 

URITemplate Inconsistency... QueryStrings Parameters Sometimes Null - Sometimes Not...

Hello all,

I've encountered a strange inconsistecy in the way WCF parses URIs?

My contract looks like:

    <OperationContract()> _
    <WebGet(UriTemplate:="{CampaignID}/objects?page={Page}&pagesize={PageSize}")> _
    Sub getObjects(ByVal CampaignID As String, ByVal Page As String, ByVal PageSize As String)

    <OperationContract()> _
    <WebInvoke(Method:="POST", UriTemplate:="{CampaignID}/objects")> _
    Sub addObject(ByVal CampaignID As String)

getObjects cannot be run without parameters - in this case, it'll return "Method Not Allowed".

However - if addObject is removed ... getObjects CAN run without parameters (Null will be passed in for Page/PageSize).

Why is there an inconsistency in the way WCF processes query string parameters - is there a way to fix this inconsistency... i

Page Methods querystrings are null



I'm having problems with accessing querystring params in my page method. Everywhere I read it says you can access querystrings just fine, but when I try it just returns null, what's the problem?

same problem I found -  http://stackoverflow.com/questions/1765188/access-to-querystring-session-from-a-static-method


thanks in advance

Accessing Querystrings in URL Rewriting


 Hello everyone and thanks for your help in advance.  I am wanting to develop a URL Rewriting solution that handles postbacks and querystrings.  I have found a couple of examples, but don't fully udnerstand the code and don't want to implement code I don't understand.  Obviously at the heart of this issue is intercepting the raw url before the rewrite occurs, however, I am not sure exactly how to go about this.  Any help would be greatly appreciated.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend