开发者

Passing data from a page to textbox inside a gridview in another page

开发者 https://www.devze.com 2023-03-29 19:45 出处:网络
Can anyone please help me with the following situation? I\'ve a default.aspx page in which I\'ve 3 user controls.

Can anyone please help me with the following situation?

I've a default.aspx page in which I've 3 user controls. In one of the user control (say UC1.ascx), 开发者_如何学JAVAI have a gridview which has controls like hyperlink and textboxes. On hyperlink click, I am opening another page in which I've another user control (say UC1.ascx) where some data is fetched from the database and displayed in a gridview. The user will select some of the data and on button save clicked, I am saving the data into a session variable as well as closing the page simultaneously. My problem is on this button save clicked, I want to update whatever data the user selected to be posted back to the UC1.ascx and bound to the textbox.

I'm not sure how to go about this in javascript. Got suggestion to use ASP.NET Ajax update panel. I'm completely new to ASP.NET Ajax. So somebody please help with the Ajax approach.


The page you close will need to set a value in the original window via javascript assuming the original opened a new window/popup as listed below.

However - have you thought about any other methods, such as ajax requests/update panels on the page to show other dynamic portions of data?

See: http://www.codingforums.com/archive/index.php/t-61319.html

specifially glenngv's post:


function setColor(color){
if (opener && !opener.closed){
opener.document.theForm.theField.value = color;
opener.focus();
}
window.close();
}

0

精彩评论

暂无评论...
验证码 换一张
取 消