Question : Setting the text box value within DetailsView ?

Hi,

I am trying to set a text box within this control to a default value:

I have tried this:

    Protected Sub DetailsView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles DetailsView1.DataBound
        Dim myDetailsView As DetailsView = DirectCast(sender, DetailsView)
        If myDetailsView.CurrentMode = DetailsViewMode.Insert Then
            DirectCast(myDetailsView.FindControl("action_ref"), TextBox).Text = DateTime.Now.ToString("M/d/yyyy HH:mm")
        End If
    End Sub

But it gives me the following error:

Object reference not set to an instance of an object.

Does anything look out of place?

Answer : Setting the text box value within DetailsView ?

You will have to run all these commands on the Exchange Server before the Installation.

http://technet.microsoft.com/en-us/library/bb125224.aspx

The Schema Version is Different for Exchange 2007 and it needs to be updated to Schema Version of Exchange 2010.

Usually these commands will be run by default when you run the Setup Wizard.

Random Solutions  
 
programming4us programming4us