I have a web form where I call a method, if page is not post back some thing like
if (!IsPostBack)
FillCustomerDetails();
and FillCustomerDetails call a third party component and get a string back. I chop that string fill few asp:TextBox like
txtAddress.Text = obj.Address;
txtPostCode.Text = obj.PostCode;
etc...
Now I have a
<input type="text" name="getAddress" id="getAddresst" onkeyup="keyUp(event)" /> control on the same page.
So when user type in any thing in this Textbox, onkeyup is fired which is written in seperate .js file, which I have included on this page.
Now this javascript Function onkeyup calls the c# code as
document.getElementById('btnAddress').click(); (which is a <asp:Button>)
So javascript is basically calling c# code and c# code is setting the values on <asp:TextBoxex> like
txtAddress.Text = obj.Address;
txtPostCode.Text = obj.PostCode;
Now my problem is, first time when page is loaded , it checks !IsPostBack and fills the TextBoxes
txtAddress.Text = obj.Address;
txtPostCode.Text = obj.PostCode;
But when user types the new Address in the
<input type="text" name="getAddress" id="getAddresst" onkeyup="keyUp(event)" />,
javascript function fires , calls same c# code and fills the relevant text boxes again.
but when I do the view source it still shows the old values in the text boxex though when I debug it shows that new values are added.
What can I do to make these new values available to the browser?
Thanks
if (!IsPostBack)
FillCustomerDetails();
and FillCustomerDetails call a third party component and get a string back. I chop that string fill few asp:TextBox like
txtAddress.Text = obj.Address;
txtPostCode.Text = obj.PostCode;
etc...
Now I have a
<input type="text" name="getAddress" id="getAddresst" onkeyup="keyUp(event)" /> control on the same page.
So when user type in any thing in this Textbox, onkeyup is fired which is written in seperate .js file, which I have included on this page.
Now this javascript Function onkeyup calls the c# code as
document.getElementById('btnAddress').click(); (which is a <asp:Button>)
So javascript is basically calling c# code and c# code is setting the values on <asp:TextBoxex> like
txtAddress.Text = obj.Address;
txtPostCode.Text = obj.PostCode;
Now my problem is, first time when page is loaded , it checks !IsPostBack and fills the TextBoxes
txtAddress.Text = obj.Address;
txtPostCode.Text = obj.PostCode;
But when user types the new Address in the
<input type="text" name="getAddress" id="getAddresst" onkeyup="keyUp(event)" />,
javascript function fires , calls same c# code and fills the relevant text boxes again.
but when I do the view source it still shows the old values in the text boxex though when I debug it shows that new values are added.
What can I do to make these new values available to the browser?
Thanks