Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field contents not carried thru query string correctly
Message
 
À
29/08/2003 16:06:06
Patty Solomon
Central Susquehanna Intermediate Unit
Milton, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
WebForms
Divers
Thread ID:
00824692
Message ID:
00824892
Vues:
15
Hi Patty,

To add more to what Michael wrote, you can change your Hyperlink column from a Bound column to a Template column. Then go into the HTML tab and change the NavigateUrl to incorporate the Server.UrlEncode method call. Here is an example of modifying the sample we did while I was at your company doing the training:
NavigateUrl='<%# "OrderEdit.aspx?orderID=" + Server.UrlEncode(DataBinder.Eval(Container, "DataItem.OrderID", "{0}")) %>'
>My grid contains a hyperlink column which has been set up with a URL format string that passes an unknown parameter value: "Page.aspx?field={0}"; and a URL field: field.
>
>The hyperlink works fine for field values that start with a letter or number; but the link fails when the value starts with an "&". The value "" is passed instead of the field value.
>
>Does the "&" mean something to dotNet that causes this behavior? Is there a work-around that allows the field value to pass with the "&" as the first character.
>
>Thanks for any information -
>Patty
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform