我要进行动态控制吗? [英] I want to make dynamic control?

查看:65
本文介绍了我要进行动态控制吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在searchpage.aspx(page_load事件)上制作动态控件的占位符,标签和图像.

动态控件是根据搜索记录进行的. (意味着如果有5条记录,则在占位符中创建5个标签和5个图像).

从数据库(表)中检索所有信息,图像从解决方案资源管理器中检索
(文件夹名称:-images).

我按姓和名搜索记录.

请帮助我的朋友!

I want to make dynamic control placeholder, label, and images on searchpage.aspx (page_load event).

Dynamic controls are making according to searching records. (Means if 5 records are there, then 5 label and 5 images are created in placeholder).

Retrieve all information from database (table) and images are from solution explorer
(foldername:-images).

I search record by firstname and lastname.

Please help me friends!

推荐答案


我认为您应该使用中继器控件.它只会对来自数据库的可用记录重复.让您的中继器显示标签和图像.每条记录都会显示一个标签和图像.
I think you should use repeater control. it will repeat only for the available records coming from the database. Have your repeater to show a label and image. for each record a label and image will be displayed.


Gaurav,

我们可以通过多种方式做到这一点.几个如下.

1. jquery中有一个概念可以在客户端脚本中实现,称为"jquery模板".

请参阅此链接:
http://api.jquery.com/jquery.tmpl/ [
Hi Gaurav,

We can do this many ways. few are as follows.

1.There is a concept in jquery to achieve this in client script, called ''jquery templates''.

refer this link:
http://api.jquery.com/jquery.tmpl/[^]

If you know ajax its pretty much simple to achieve this task using jquery template.


2.otherwise you have to add html literal control from server script.

3.use gridview template or repeater control.

First one is most preferable by most of the developers for performance.


这篇关于我要进行动态控制吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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