Click here to Skip to main content
12,818,664 members (30,408 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
okk first of all i know about qury string overview is that query string is use to post some value of one page to another page....okk its fine
now i m creating one CMS website now in that i have one menu link named PRODUCTS now click on this it will show all the products in perticular table format my point is when click of perticular image of this product it will post to another page and it will show large image with technical description of this product so in URL it is shown like http:\\\Products.aspx?Id=1234 now i want hint of coding for this i can generate Id in url it willl come from database value ?? please give me some hints .....thank u
Posted 21-Feb-13 9:37am
Updated 21-Feb-13 9:56am
Sergey Alexandrovich Kryukov 21-Feb-13 14:42pm
C and ASP.NET? How is it?
pandya purvang 21-Feb-13 14:48pm
sorry its c# and
Sergey Alexandrovich Kryukov 21-Feb-13 14:55pm
Can you see "Improve question" on top? :-)
pandya purvang 21-Feb-13 14:57pm
yes sir ...but if any one give me some hint then it is also very helpfull to me ..
ryanb31 21-Feb-13 15:04pm
You just need to read the data from the database and put it onto the querystring. Maybe if you posted some relevant code we can be more specific.
pandya purvang 21-Feb-13 15:08pm
sir right now i m on the statge of R&D so i m doing research so pls give some coding idea about this type of requirement
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I suggest you to start here: ASP.NET Tutorial[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hi, Use datalist to show your product images, datalist have property that 'DataKeyField' set this property is equal to your ProductId, and use ItemCommand Event to go to the Product details page.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Its probably best to use UrlEncode[^] with your query string. This encodes the string during transmissions and protects from injection attacks.
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

Dear Pandya
It seems that you have problem in to fetch the data from database and forward it to the next page with the use of Query String
So for that purpose firstly bind your data in ListView(I am taking an example with the help of Eval)
Suppose From your requirement There is and product id(From DB) Which you want to take with your page
<asp:listview id="list" runat="server" groupitemcount="1" xmlns:asp="#unknown">

Do not forget to bind this list view in code behind
Hope You got the solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 22 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100