Hi,
I have a datagrid which has linkbuttons for edit accept and cancel. I want to make the buttons inactive(or invisible) after certain date.Please help me with your suggestions.
Thanks
Hi,
I have a datagrid which has linkbuttons for edit accept and cancel. I want to make the buttons inactive(or invisible) after certain date.Please help me with your suggestions.
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
sriPosted Oct 24, 2006, 4:26 PM
I have a question....linkbutton in datagrid which is used for accept edit cacel doesnot have any id associated with it .How to disable the button in this case...
the HTML is
your inputs are appreciated.
Thanks.
Scott LyslePosted Oct 24, 2006, 4:02 PM
If this is intended to expire a trial version of an application, you will want to do something like store the start date of the trial period in the registry (in some covert way) and retrieve it from the registry when the application starts, but in general, this code will do what you want to do: Try it out and change the date to a time before or after today to see it in effect.
Public
Class Form1 Private mTargetDate As DateTime = "6/6/2009" Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim dt As DateTimedt = Now
If (dt >= mTargetDate) ThenButton1.Enabled =
FalseButton2.Enabled =
False End If End SubEnd
Class