具有C#和gridview控件的asp.net [英] asp.net with c# and gridview control

查看:51
本文介绍了具有C#和gridview控件的asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生
提前谢谢.
我有问题请帮助我..........

我想通过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#........

推荐答案

编写的代码阅读本文

http://weblogs.asp.net/hpreishuber/archive/2005/08/05/421712.aspx [ ^ ]
read this article

http://weblogs.asp.net/hpreishuber/archive/2005/08/05/421712.aspx[^]


Piku da,
我认为,可以通过使用gridview中的链接按钮来实现.
只需通过以下链接.
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 [ ^ ]

希望对您有帮助.
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.


尝试一下
<asp:TemplateField HeaderText="Name" SortExpression="Name">
<ItemTemplate>
<a id="lnkWebPage" runat="server" target="_blank"><%#Eval("HotelUrl") %></a>
</ItemTemplate>
</asp:TemplateField>


这篇关于具有C#和gridview控件的asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆