i want to set a property width javascript and then use it in c#
in fact i want to create a page contain comments that when user click on reply the text on above the comment textbox change to “reply to XXX” and when click send the id of comment save in data base for parent comment
is that any solution for this?
i want to set a property width javascript and then use it in c#
Share
You should create a hidden field in the page and whenever user clicks on the reply, set the value of that hidden field to the id of question user is replying to. That way, when the user posts the form it will post both, id of what he/she has replied to as well as his/her own comment.
To find the hidden field use findcontrolbyid function.
Make sure that you supply client id of the hidden field (Not that you have assigned through visual studio ide but the one actually rendered by asp.net. You can check it by viewing source of the rendered page. – asp.net assigns dynamic id to all server side controls.)