jasoncky
|
Posted: 01/19/2006, 1:25 AM |
|
Hi,
how do i hide the button in ASP.NET, i always get the following error
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
|
|
|
Allen
Posts: 2
|
Posted: 01/20/2006, 6:24 AM |
|
<formname><buttonname>.Visible=false;
You can create a record form (name=employees). Add a button into the form(button name = Button1).
You can add some code in record form's 'Before Show' Event:
employeesButton1.Visible=false; //C#
That's all.
|
|
|
E43509
Posts: 283
|
Posted: 01/23/2006, 7:11 AM |
|
Open up your aspx.vb file associated with the form of interest and you should find the name of your button as Allen stated above in the declare section 'Forms Objects @1-1C0283D4
For example:
Dim Protected MyFormbtnExit As HtmlInputButton
In the before show you can add Javascript or set the button attributes such as:
MyFormbtnExit .Attributes("OnClick") = "self.close();"
MyFormbtnExit .Visible = False
|
|
|
|