How to avoid Postback in dropdnlist Or read more....?

Posted by Oswaldlily under ASP.NET on 7/16/2013 | Points: 10 | Views : 1116 | Status : [Member] | Replies : 4
Both controls inside gridview
Postback for dropdownlist necessary(so that my next column value gets display depends upon selection of dropdnlist)

But because of this postback i m losing my fileupload control value


If i avoid Postback in dropdownlist,what can be the solution??
Or
How to save fileupload value with Postback?




Responses

Posted by: aswinialuri-19361 on: 7/16/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,
refer this link it might be useful to you
http://social.msdn.microsoft.com/Forums/vstudio/en-US/ee1f89cf-ecb5-48cd-8b69-03becfc51a81/how-to-prevent-postback-in-dropdownlist-selectedindexchanged

Mark as Answer if it helps you
Thanks&Regards
Aswini Aluri

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Oswaldlily on: 7/16/2013 [Member] Starter | Points: 25

Up
0
Down
@Aswini:

Hope that same problem i m undergoing..

Acc to your link,if i set autopostback to false,

OnselectedIndexChange wont get fire..

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jafarekbalmca on: 7/19/2013 [Member] Starter | Points: 25

Up
0
Down
First set the autopostback property to false of dropdownlist and then use the ajax functionality with the dropdownlist and its associated controls, fileupload control value remain unchanged.

The Beginning Of All Big Thing Is Small.
Jafar Ekbal

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jitendrasoft09 on: 7/20/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Oswaldlily,

Please make sure that you are keeping fileupload control inside update panel to lose your fileupload value, refer below link for more information-

http://msdn.microsoft.com/en-us/library/bb399001(v=vs.100).aspx

Hope you are clear.




Jitendra Kumar
If my post helps you, plz mark as an answer.

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response