ASP.NET with jQueryUI: text box value is getting as null in Button click event?

It is working perfectly fine dear! (I've used your code only).

Up vote 1 down vote favorite share g+ share fb share tw.

I have an ASP. NET page where I have a button When a user clicks on the button,I will check whether the user has logged in or not. If not logged in I will show a modal popup to login (using jQueryUI).

I have placed one textbox(txtPassword) and one button(btnLogin) control in the Div which will be shown by the jQueryDialog. But in btnLogin's Click event, I am not able to read the Text value entered in the textbox txtPassword The below is my code Enter your EmailId & password Email Password Server side Code protected void btnGo_Click(object sender, EventArgs e) { CheckUserLoggedIn(); } private void CheckUserLoggedIn() { if (Session"username"! = null) { Response.

Write("Logged in user"); ClientScript. RegisterHiddenField("isAuthenticated", "true"); } else { ClientScript. RegisterHiddenField("isAuthenticated", "false"); } } protected void btnLogin_Click(object sender, EventArgs e) { string txtSample= TextBox1.

Text; // this is showing the value 'sample' string txtPass= txtPassword. Text; // this is showing null if (txtPass == "shyju") { Session"username" = txtPassword. Text; Response.

Redirect("TestingModal. Aspx"); } } My java script code to render the dialog $(function() { var name = $("#name"), email = $("#email"), password = $("#password"), allFields = $(). Add(name).

Add(email). Add(password), tips = $("#validateTips"); function updateTips(t) { tips. Text(t).

Effect("highlight",{},1500); } function checkLength(o,n,min,max) { if ( o.val(). Length > max || o.val(). Length ' + '' + name.val() + '' + '' + email.val() + '' + '' + password.val() + '' + ''); */ alert("Check User Credentials") $(this).

Dialog('close'); } }, Cancel: function() { $(this). Dialog('close'); } }, close: function() { allFields. Val('').

RemoveClass('ui-state-error'); } }); $('#create-user'). Click(function() { $('#dialog'). Dialog('open'); }) .

Hover( function(){ $(this). AddClass("ui-state-hover"); }, function(){ $(this). RemoveClass("ui-state-hover"); } ).

Mousedown(function(){ $(this). AddClass("ui-state-active"); }) . Mouseup(function(){ $(this).

RemoveClass("ui-state-active"); }); var isAuthenticated = $("#isAuthenticated").val(); if (isAuthenticated && isAuthenticated == "false") { // Display the modal dialog. $("#dialog"). Dialog("open"); } }); I had hard coded the text properties value of TextBox1 as 'sample' in the HTML part of my ASPX file .

In button click event I am getting it. But the other textbox,txtPassword 's Text property is giving me null value Please guide me to go ahead Thanks in advance asp.net jquery . Net-2.0 link|improve this question edited Jun 9 '09 at 19:44Joel Coehoorn123k34225421 asked May 18 '09 at 7:56Shyju8,5291263146 71% accept rate.

There is not enough code here to really get whats going on. Are you setting the value in the Page_Load events, do you have some jQuery code clearing out the value. – jfar May 18 '09 at 8:05.

I just posted the full code now in my question . – Shyju May 18 '09 at 8:13 @Shyju I've email you the web project – TheVillageIdiot May 18 '09 at 8:54 but this does not have a jQuery UI dialog implementation I think . Is it?

– Shyju May 18 '09 at 9:18.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions