473,549 Members | 2,597 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Encode QueryString Value

5 New Member
hi,

Any one can help me.

<asp:GridView ID="grvDCList" runat="server" AutoGenerateCol umns="False" >
<Columns>
<asp:HyperLinkF ield HeaderText="DC Number" DataNavigateUrl Fields="Code"
DataNavigateUrl FormatString="D efault.aspx?Cod e={0}" Target="_blank"
DataTextField=" DC_NO" NavigateUrl="#" >
<ItemStyle HorizontalAlign ="Left" />
</asp:HyperLinkFi eld>
<asp:BoundFie ld DataField="DCDA TE" 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 2764
dip_developer
648 Recognized Expert Contributor
hi,

Any one can help me.

<asp:GridView ID="grvDCList" runat="server" AutoGenerateCol umns="False" >
<Columns>
<asp:HyperLinkF ield HeaderText="DC Number" DataNavigateUrl Fields="Code"
DataNavigateUrl FormatString="D efault.aspx?Cod e={0}" Target="_blank"
DataTextField=" DC_NO" NavigateUrl="#" >
<ItemStyle HorizontalAlign ="Left" />
</asp:HyperLinkFi eld>
<asp:BoundFie ld DataField="DCDA TE" 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.......i t is not for encryption....b ut for encoding/decoding a querystring
Sep 19 '07 #2
Plater
7,872 Recognized Expert Expert
You want it to look like it would in the address bar on a webbrowser?
Use:
string myquery =Uri.EscapeData String("this string");//will convert it to "this%20str ing"

And this one:
string regulartext=Uri .EscapeUriStrin g(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
9070
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 different number in the URL that would load a different page. I'd prefer not to have to use a password. Code samples would be most helpful. thanks
1
6727
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: popup.html?pImage=30_leilani_dowding_b_060.jpg&ordRef=1000&Title=Leilani&nbsp;Dowding using the QueryString function below, the pImage variable should...
4
4889
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 appreciated. Regards.
12
5277
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 ... www.something.com/main.aspx?client Client is the QueryString, but no value is given. This would mean to me that client exists, so its value is true. In the code...
3
3120
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 that I can check for the existance of a parameter value in that previous querystring.
13
26422
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 'confirmationMessage' querystring unless I do NOT encode the ampersand. I assume I'm missing something obvious here. Any suggestions?
3
6247
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 something like: var email_link = "<a href=\"mailto:whoever@wherever.com?subject=" + document.URL + "\">"; document.write(email_link);
5
2188
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 UserNames are displayed to him as hyperlinks. Based on the UserName clicked by a user, the next page (to which the user will be taken to when he...
4
5955
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) { if ( Request.QueryString.Count 0 ) { if ( Request.QueryString != "" )
0
7527
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7459
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7726
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7967
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7485
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7819
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5377
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
772
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.