QPR
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_Updat es'. If you want to overload the base method, this method must be declared 'Overloads'.
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_Updat
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You must only have page_load event in aspx.vb not in aspx.
Move your code to the aspx.vb.
Move your code to the aspx.vb.
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?
If Page.IsPostBack Then
Me.cal.Style.Add("display"
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.
ASKER
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"
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?