c# - Disabling textboxes on page load -


i have login form in 1 div hidden , when clicked on "login" visible. login form in master page , has client side html5 validations email id , pwd.

i have 1 child page ajax update panel has 1 button "add cart". due validation in master page login form m not able postback on "add cart" button click.

for avoiding such thing m trying disable text boxes in login form(which in master page) @ page load: c#:

scriptmanager.registerstartupscript(this,this.gettype(), "javascript2", "javascript:disablepopuptxt();", true); 

js:

function disablepopuptxt() {      document.getelementbyid("txtcustemailid").disabled = true;     document.getelementbyid("txtcustpwd").disabled = true; } 

but above code not working , not able post back on of child page. plz give me solution.

thanx in advance.

i think setting causevalidation=false on particular link or button might solve error more understanding can check msdn


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -