Click here to Skip to main content
15,892,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?
Posted

Foe every click on SELECT keep value of fileupload in View state & assign back for each refresh
checking null value.
 
Share this answer
 
Comments
Sunil Dhanerwal1 24-Jun-13 3:06am    
this is not working...
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.
 
Share this answer
 
v2
Comments
Sunil Dhanerwal1 24-Jun-13 3:09am    
i have simple using get and set on user control. in get i have used return this.gridview1.selectedrows.cells[0].text;
in set, i use same as value.
after this i call it on .aspx page using modalpopup.
Sunil Dhanerwal1 24-Jun-13 3:27am    
i have used modalpopextender to display gridview, but still not able to get value from gridview to textbox without postback. can u plz post some code for this??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900