I wanted to do a POC to my client to show modal popup functionality. So I did a simple page with one Button and a TextBox. That Button is responsible to popup the modal window. On that ModalPopup I implemented a search mechanism. I used Girdview control to show the search result.
I wanted to populate the id value of that search result which was binded to a link button. This gridview and the text box and button was in a AJAX update panel control. I did this because I wanted to have the smothness of the UI.
Now I met a new problem. Because I wanted to get that value out of that LinkButton control and show it in a TextBox control which was out of the ModalPopup.
So what I did was, I just assign that LinkButton's text property to a HiddenField and I used a JavaScript function to populate that HiddenField value the TextBox.
As you all know we need a Panel control to show our ModalPopup. This is gonna be a <div> on the HTML. So I used the onblur event to call my JavaScript function.
So my problem is solved. :D
I think this will help you all one day.
I wanted to populate the id value of that search result which was binded to a link button. This gridview and the text box and button was in a AJAX update panel control. I did this because I wanted to have the smothness of the UI.
Now I met a new problem. Because I wanted to get that value out of that LinkButton control and show it in a TextBox control which was out of the ModalPopup.
So what I did was, I just assign that LinkButton's text property to a HiddenField and I used a JavaScript function to populate that HiddenField value the TextBox.
As you all know we need a Panel control to show our ModalPopup. This is gonna be a <div> on the HTML. So I used the onblur event to call my JavaScript function.
So my problem is solved. :D
I think this will help you all one day.
Comments