.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Textbox Visible property

Posted By: Senthilnathan     Posted Date: May 06, 2011    Points:5   Category :ASP.Net
Hi Friends,

I'm Having a textbox , Dropdownlist and Button in my aspx page.

When item is selected in dropdown list, I make textbox visible false by using javascript.

And,

in Button click im doing some validation and the alert will come if there is any validation failed.


My Problem is,

When I click button the alert is working fine but the textbox is visible (true) automatically.

I never write code to make textbox visible true in aspx.cs page.

But still its happening..

How to solve this?

Please help me on this...


Responses
Author: Arul             
Posted Date: May 06, 2011     Points: 20   

I think it happens bcoz of page postback.

Author: Senthilnathan             
Posted Date: May 06, 2011     Points: 20   

Hi Arul,

How to solve this one..

Author: Senthilnathan             
Posted Date: May 06, 2011     Points: 20   

-

Author: Arul             
Posted Date: May 06, 2011     Points: 20   

Hi,

In ur code behind file add the following line of code.

Button1.Attributes.Add("onclick", "return false");

Author: Maverick             
Posted Date: May 09, 2011     Points: 20   

Hello,

use txtTextbox1.style.add("display","none")

Hope this helps.

Thanks,
Maverick


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend