Jui Test
Jui Test

Reputation: 2409

Onselectedindexchanged does get fired sometime

Aspx page :

fileupload 
dropdownlist subject  
Textarea

User can write anything in textarea.There is no sequence, that user can first write text or upload file.Dropdownlist has onchange and selected indexchanged event.Onchange event calling javascript function which convert '<',to it's html encode character if textarea contain.On selectedindex change appropriate script of that subject code get added into textarea replacing previous one.It is not necessary that user should select subject for script,can write it's own.Every thing is working properly over here.When I selecting file other than text I want hide dropdownlist subject and want to make index at zero. Suppose I uploaded text file,selected subject which inserted script into textarea,now I want to select img rather than text file,if I do, dropdownlist get disable and show first value document.getElementById('ddlSubject').selectedIndex = 0.Textarea is empty.Every thing is working properly here .But when I again select textfile,textarea and dropdownlist get enable.If I choose one subject which was selected previously,serverside event of dropdownlist did not get fired.If I choose other subject it call server side function.How to handle this

Upvotes: 0

Views: 32

Answers (1)

JokingBatman
JokingBatman

Reputation: 66

Please make sure you have the property of the control set as AutoPostBack = true. Furthermore, it'll be easier if you could share a code snippet.

Upvotes: 1

Related Questions