问题描述
先生
提前谢谢.
我有问题请帮助我..........
我想通过response.redirect转到项目中的页面.
但是页面名称将根据用户需要从gridview结果集中选择.
页面名称最后包含.aspx格式.
用户可以选择第1行,也可以从gridview中选择必须为名称的任何行值,然后将其直接重定向到具有相同名称的页面.
这基本上是一个酒店管理项目.
用户在其中搜索可用的酒店,并将结果显示到gridview中.
从该gridview用户中选择1个酒店名称,然后将其直接重定向到在...之前创建的该酒店页面.
可以通过单击按钮来完成吗?
看起来像那样
酒店名称|城市|说明
泰姬陵|加尔各答|朝阳
明星|孟买| asassadsd
hayat |德里| asasadsdgg
我只希望每当用户单击taj时都会进入taj页面.
就像那颗星星和hayat.
taj.aspx,star.aspx和hayat.aspx以前是在同一网站上创建和设计的.
结果通过gridview显示
而用c#........
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#........
推荐答案
<asp:TemplateField HeaderText="Name" SortExpression="Name">
<ItemTemplate>
<a id="lnkWebPage" runat="server" target="_blank"><%#Eval("HotelUrl") %></a>
</ItemTemplate>
</asp:TemplateField>
这篇关于具有C#和gridview控件的asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!