473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Encode QueryString Value

hi,

Any one can help me.

<asp:GridView ID="grvDCList" runat="server" AutoGenerateColumns="False" >
<Columns>
<asp:HyperLinkField HeaderText="DC Number" DataNavigateUrlFields="Code"
DataNavigateUrlFormatString="Default.aspx?Code={0} " Target="_blank"
DataTextField="DC_NO" NavigateUrl="#" >
<ItemStyle HorizontalAlign="Left" />
</asp:HyperLinkField>
<asp:BoundField DataField="DCDATE" HeaderText="DC Date" >
<ItemStyle Font-Bold="False" HorizontalAlign="Left" />
</asp:BoundField>
</Columns>

its my coding. i want to encode that querystring (code) value.
now its display in original format , i want to encode that.

and decode also..


please......
Sep 19 '07 #1
2 2740
dip_developer
648 Expert 512MB
hi,

Any one can help me.

<asp:GridView ID="grvDCList" runat="server" AutoGenerateColumns="False" >
<Columns>
<asp:HyperLinkField HeaderText="DC Number" DataNavigateUrlFields="Code"
DataNavigateUrlFormatString="Default.aspx?Code={0} " Target="_blank"
DataTextField="DC_NO" NavigateUrl="#" >
<ItemStyle HorizontalAlign="Left" />
</asp:HyperLinkField>
<asp:BoundField DataField="DCDATE" HeaderText="DC Date" >
<ItemStyle Font-Bold="False" HorizontalAlign="Left" />
</asp:BoundField>
</Columns>

its my coding. i want to encode that querystring (code) value.
now its display in original format , i want to encode that.

and decode also..


please......
read this... a good example.......it is not for encryption....but for encoding/decoding a querystring
Sep 19 '07 #2
Plater
7,872 Expert 4TB
You want it to look like it would in the address bar on a webbrowser?
Use:
string myquery =Uri.EscapeDataString("this string");//will convert it to "this%20string"

And this one:
string regulartext=Uri.EscapeUriString(myquery);//will convert it back
Sep 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Terri | last post by:
I want to send emails that would include a link to an asp page. The link would look like http://10.0.0.10/ContactDetails.asp?ID=18484 How can I prevent someone from simply typing in a...
1
by: lion | last post by:
my Problem: a query string passed into a html page doesn't display correctly on a mac I am just using html and javascript (no ASP, PHP or server side scripting) This is the query string:...
4
by: Newbie | last post by:
How would I modify this form to encode *all* the characters in the 'source' textarea to the '%xx' format & place result code into the 'output' textarea? (cross browser compatable) Any help is...
12
by: Alex | last post by:
I have a question about determining if one QueryString keys exists. The idea is, if this key exists, than its presence is enough to indicate that its value is true. For example ... ...
3
by: Dan Sikorsky | last post by:
How can I get the Querystring passed to the Referring Page from its referrer? I don't want the querystring coming to my current page. I want the querystring that came to the referring page, so...
13
by: darrel | last post by:
I am creating a querystring to look like this: form_edit.aspx?collectionID=25&amp;confirmationMessage=New+form+entry+saved Note that I'm escaping the ampersand. However, I can't grab the...
3
by: Christian Blackburn | last post by:
Hi Gang, I need to know the javascript syntax to encode a URL to fit into a querystring. Basically I want to pass the URL of the current web page as the subject of an e-mail so it'd be...
5
by: rn5a | last post by:
A MS-Access database table has 2 columns - UserID (unique) of number data type & UserName (text) along with some other columns. When users come to a particular page, say, AllUsers.asp, all the...
4
by: =?Utf-8?B?RVcgTmV3Ymll?= | last post by:
My apologies in advance if there is a better forum for this question. Given the following snippet: <script type="text/c#" runat="server"> protected void Page_Load(Object Sender, EventArgs e)...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.