Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Can we hide query string parameters in the URL?

Can we hide query string parameters in the URL?

Scheduled Pinned Locked Moved Web Development
csharpcssdatabaselinqsales
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pzn3xq
    wrote on last edited by
    #1

    Is there a way to hide all of your query paramters in the URL so the user cannot change the values? For example, instead of http://localhost:4777/LINQ/DML/Grid View - select/HyperLinkOrderDetails.aspx?aOrderID=10248&CustomerId=VINET, can we change the URL to simply be: http://localhost:4777/LINQ/DML/Grid View - select/HyperLinkOrderDetails.aspx (thus not showing the orderID or Customer ID?) Thanks!

    C 1 Reply Last reply
    0
    • P pzn3xq

      Is there a way to hide all of your query paramters in the URL so the user cannot change the values? For example, instead of http://localhost:4777/LINQ/DML/Grid View - select/HyperLinkOrderDetails.aspx?aOrderID=10248&CustomerId=VINET, can we change the URL to simply be: http://localhost:4777/LINQ/DML/Grid View - select/HyperLinkOrderDetails.aspx (thus not showing the orderID or Customer ID?) Thanks!

      C Offline
      C Offline
      cyber drugs
      wrote on last edited by
      #2

      Yes, you can, you make use of POST method, rather than GET method on the form which is submitting the query. If you are still having some trouble, perhaps posting a code snippet of how you navigate to this page, would be of great benefit for us to help you out.

      P 1 Reply Last reply
      0
      • C cyber drugs

        Yes, you can, you make use of POST method, rather than GET method on the form which is submitting the query. If you are still having some trouble, perhaps posting a code snippet of how you navigate to this page, would be of great benefit for us to help you out.

        P Offline
        P Offline
        pzn3xq
        wrote on last edited by
        #3

        Sure...I basically have a linqdata source retrieving the Orders table from northwind. I then have a grid displaying the OrderId, Shipped Date and a new column that is a hyperlink. The hyperlink will build a DataNavigateURL to pass the orderID and customerId to a new page (HyperLinkOrderDetails.aspx?aOrderID={0}&CustomerId={1}). Any way that I can only display http://localhost/HyperLinkOrderDetails.aspx instead of http://localhost/HyperLinkOrderDetails.aspx?aOrderID=ABCD&CustomerId=12345?

            AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="OrderID" 
                DataSourceID="dsOrders" onrowcreated="GridView1\_RowCreated" 
                onrowdatabound="GridView1\_RowDataBound" 
                onrowcommand="GridView1\_RowCommand">
                ReadOnly="True" SortExpression="OrderID" >
                    SortExpression="ShippedDate" >
                    DataNavigateUrlFields="OrderId, CustomerId" 
                        DataNavigateUrlFormatString="HyperLinkOrderDetails.aspx?aOrderID={0}&CustomerId={1}" 
                        HeaderText = "Order Details"
                        Text="View order details" /> 
          
            
            ContextTypeName="NorthwindDataContext" TableName="Orders">
        
        P 1 Reply Last reply
        0
        • P pzn3xq

          Sure...I basically have a linqdata source retrieving the Orders table from northwind. I then have a grid displaying the OrderId, Shipped Date and a new column that is a hyperlink. The hyperlink will build a DataNavigateURL to pass the orderID and customerId to a new page (HyperLinkOrderDetails.aspx?aOrderID={0}&CustomerId={1}). Any way that I can only display http://localhost/HyperLinkOrderDetails.aspx instead of http://localhost/HyperLinkOrderDetails.aspx?aOrderID=ABCD&CustomerId=12345?

              AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="OrderID" 
                  DataSourceID="dsOrders" onrowcreated="GridView1\_RowCreated" 
                  onrowdatabound="GridView1\_RowDataBound" 
                  onrowcommand="GridView1\_RowCommand">
                  ReadOnly="True" SortExpression="OrderID" >
                      SortExpression="ShippedDate" >
                      DataNavigateUrlFields="OrderId, CustomerId" 
                          DataNavigateUrlFormatString="HyperLinkOrderDetails.aspx?aOrderID={0}&CustomerId={1}" 
                          HeaderText = "Order Details"
                          Text="View order details" /> 
            
              
              ContextTypeName="NorthwindDataContext" TableName="Orders">
          
          P Offline
          P Offline
          perle1
          wrote on last edited by
          #4

          Hi, you can use the Sessionstate, Viewstate or Cookies to store your data. Hope it will help you. Greeting, Ralph

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups