Ok.. I tried a bunch of ideas... and read a bunch of people who had a luck with this in asp.net and im not sure why I am having some many issues.
Here is what I got working so far..
The page loads.. I click the button once.. and it sends a req to server and server makes a id..
-fire before or after but either way but the txtid.val() is blank the first page load... dont make sense..
After one click, the value then fills in and the value looks to be correct..
Continue to click, and it appears to work..
It am not sure why it is blank when you first push it.. only thing I can think of is because its firing before the server responds..
Im going to slow it down with some fake delays on the server side to see if I am right.. (EDIT - Delay - Script is firing when button is clicked not when server response to button click.)
Here is the code I am working with..
string
javaScriptFunction =
"function pageLoad() {"
+
"$(document).ready(function(){"
+
"$('.btnClick').click(function () {"
+
"alert('Alert: Hello from jQuery! - ' + $('.txtid').val());"
+
"});"
+
"});"
+
"}"
;
MonoSoftware.MonoX.Utilities.JavascriptUtility.RegisterStartupScript(UpdatePanel1x,
this
.GetType(),
"scriptname"
, javaScriptFunction,
true
);