Link to home
Start Free TrialLog in
Avatar of QPR
QPRFlag for New Zealand

asked on

build errors

VS2005 is intent of driving me insane!
After several changes to this web site and succesful builds and publishes it decides (once in a while) to refuse to run citing several warnings.
So....
Why is it inconsistent in reporting these errors? Why do warnings top it from building?
And most importantly what do these errors mean and how can I fix them?

1. Dim objCmd = New SqlCommand()
Warning Variable declaration without an 'As' clause; type of Object assumed.

2. Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.LoadWarning 6  sub 'Page_Load' shadows an overloadable member declared in the base class 'Admin_LatestUpdates_Updates'.  If you want to overload the base method, this method must be declared 'Overloads'.
ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of QPR

ASKER

1. thanks
2. possibly!?
aspx has
<script language="VB" runat="server">
    Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Page.IsPostBack Then
            Me.cal.Style.Add("display", "block")
        End If
    End Sub
</script>

aspx.vb has
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        txtTheDate.Text = System.DateTime.Now
    End Sub

is this invalid? how can i ifx?
You must only have page_load event in aspx.vb not in aspx.

Move your code to the aspx.vb.
Avatar of QPR

ASKER

thanks I posted
If Page.IsPostBack Then
            Me.cal.Style.Add("display", "block")
End If

into the page_load sub in the aspx.vb and there are no "squiggles" under it.
Is the concept of postback still applicable in code behind?
Yes, you can test it.