将GridView Value从用户控制页面返回到.aspx页面 [英] Return GridView Value from user control page to .aspx page

查看:57
本文介绍了将GridView Value从用户控制页面返回到.aspx页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的专家,

我有问题。我在页面abc.aspx上有一个文本框。我创建了一个名为select.ascx的用户控件。我已经在abc.aspx页面上引用了这个用户控件。

在我的.ascx页面上,我有一个gridview,其中包含一些行和列以及一个SELECT按钮。我做了什么,当我点击select.ascx上的这个SELECT按钮时,所选的行值出现在文本框中。太棒了。到目前为止一切都还可以。

但我的问题是当值返回到文本框时,它会跳转并删除filecload的值,该值存在于abc.aspx页面。

现在,我想要的是,如何将这个值从select.ascx页面返回到tetbox中的abc.aspx页面而不影响fileupload值???一个帮助将不胜感激

Plz问我是否发现任何疑问?

Dear Experts,
i have a problem. I have a textbox on page abc.aspx. i have made a user control named select.ascx. I have given reference of this user control on my abc.aspx page.
On my .ascx page, i have a gridview which contains some rows and columns and a SELECT button in it. what i have done that, when i clicked on this SELECT button on select.ascx , the selected rows value comes in textbox. This is perfect. Everything is ok till now.
But my problem is when value is get back to textbox, it trips and removes the value of fileupload which is present at abc.aspx page.
Now, what i want is that, How can i return this value from select.ascx page to abc.aspx page in tetbox without affecting fileupload value??? an help would be appreciated
Plz ask me if you find any diffculty with the question?

推荐答案

每次点击SELECT保持价值fileupload在View状态并为每次刷新分配回来

检查空值。
Foe every click on SELECT keep value of fileupload in View state & assign back for each refresh
checking null value.


有两种方法:

要么你把它放在ajax控件中的gridview以便它可能不会影响其他人。







在页面加载事件中使用IsPostBack属性并读取fileupload的值并重新定义到fileupload。因为在回发时文件上载,密码等被重置。
There are two ways:
Either u put the gridview inside ajax control so that it may not effect others.

Or

On pageload event use IsPostBack Property and read the value of fileupload and reasing to the fileupload. Because on postback the fileuploads,passwords,etc gets reset.


这篇关于将GridView Value从用户控制页面返回到.aspx页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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