如何根据候选名称在Gridview中显示图像 [英] How to Display the images in Gridview based on Candidate Name
问题描述
在运行模式下Gridview如下
候选人名称照片候选人签名
Ashwin Ashwin
Baskar Baskar
Chandar Chandar
当用户点击Ashwin(候选人名单)时我需要)在上面的Gridview中,我想在Gridview的Photosofcandidate列中显示Selected Candidate的图像。
上面的
,我该怎么做asp .net使用C#。
问候,
narasiman P
in Run mode Gridview as follows
Candidatename Photosofcandidate Candidatesignature
Ashwin Ashwin
Baskar Baskar
Chandar Chandar
I required as when user click the Ashwin (Candidatename) in the above Gridview, i want to display the images of Selected Candidate in the Photosofcandidate column in the Gridview.
for the above one, how can i do in asp.net using C#.
regards,
narasiman P
推荐答案
你可以做一个简单的代码。只需在网格视图中使用templateField即可。在TemplateField视图中,调用Image按钮。如果您希望数据库中的图像URL选择简单,就像imageURL
You can done a simple code. Just use the templateField in Grid view. In TemplateField view invoke the Image button. If you want image URL pick in Database simple like that imageURL
<![CDATA[<%# Eval("Name of The column where is save Image URL")%>]]>
。之后创建一个图像按钮单击事件。图像中的图像点击事件显示图像。我希望你能理解我的意思。
jsb
. after then crate a Image button Click event. Image click event in show details of Image. I hope you can understand what i am say.
jsb
请不要重新发布。
我已经在在Gridview中必须为每个教师显示图像 [ ^ ]。
Please don't repost.
I have already answered you at In Gridview image has to displayed for each faculty[^].
试试这段代码..
Try this code..
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Gridpage.aspx.cs" Inherits="POC.WebForm1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="jquery-1.10.2.js" type="text/javascript"></script>
<script type="text/javascript">
var showimage = function (thisobject) {
var image =
这篇关于如何根据候选名称在Gridview中显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!