Click here to Skip to main content
15,907,231 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
sir
Thanks in advance.
i have a problem help me..........

I want to go to a page in my project via response.redirect.
but the page name will selected from gridview result set as user wants.
The name of the page contain .aspx format at last.
User may select row 1, or any row value from gridview which must be a name, and it is directly redirected to the page with same name.


it is basically a hotel mgmt project.
where user search the available hotel and result show into gridview.
from that gridview user select 1 name of hotel and it is directly redirected to that hotel page which is created before....
can it is done via clicking a buttom?

it is a look like that

Hotel name | city | description

taj | kolkata | asaasas
star | mumbai | asassadsd
hayat | delhi | asasadsdgg

i just want that whenever user clicks at taj it will going taj page.
like that star and hayat.
taj.aspx, star.aspx and hayat.aspx previously created and design in same website.

The result is displayed via a gridview

And the code written in c#........
Posted
Updated 30-Oct-11 10:32am
v3
Comments
hitech_s 31-Oct-11 4:54am    
place linkbbuttons in place of hotel name s

you had hotel names and corresponding .aspx page means url in your database table

then while binding bind hotel names to text property of linkbutton and your page url to postback property of linkbutton
piku da 31-Oct-11 15:05pm    
plz give me a detail one with access database and design page

 
Share this answer
 
Comments
piku da 31-Oct-11 15:06pm    
plz give me a detail
Hi Piku da,
I think , it is possible by using link button in gridview.
just go through the following links.
http://www.dotnetfunda.com/forums/thread4099-link-button-using-in-gridview-another-page-redirect-how.aspx[^]

http://www.dotnetspider.com/forum/281897-How-use-linkbutton-Gridview.aspx[^]

i hope it helps you.
 
Share this answer
 
Comments
piku da 31-Oct-11 15:06pm    
plz give me a detail one with access databse
and design and coading
Try this
XML
<asp:TemplateField HeaderText="Name" SortExpression="Name">
<ItemTemplate>
<a id="lnkWebPage" runat="server" target="_blank"><%#Eval("HotelUrl") %></a>
</ItemTemplate>
</asp:TemplateField>
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900