Hello,
Right now I am having two problems.
We are trying to create a Website using ASP.net and hosting it on Godaddy. When we initially tried to use the site after we got everything uploaded. We received this message: http://img9.imageshack.us/img9/8232/errorcuz.jpg
Removing the web.config file from our subfolders seemed to remedy the problem but we want to have two Logins. One for customers and one for employees. Would there have to be two web config folders in the sub folders like there was and would we have to get Godaddy to do something to them like change them to application?
The other problem we are having is that we have a delete button with a drop down box that is supposed to populate with items to delete. Nothing is populating in the drop down box and when we hit delete we get an error saying:
System.NullReferenceException: Object reference not set to an instance of an object.
This is what the code looks like at the moment but we cannot find what is wrong with it and it has us stumped.
Dim MyConn As SqlConnection
Dim MyCom As SqlCommand
Dim MyDataA As SqlDataAdapter
Dim MyDataR As SqlDataReader
Dim MyDataSet As New DataSet()
MyConn = New SqlConnection("Data Source=******; Initial Catalog=*****; User ID=*****; Password=’******’;")
MyConn.Open()
MyCom = New SqlCommand("Select * From catalog", MyConn)
MyDataA = New SqlDataAdapter(MyCom)
MyDataA.Fill(MyDataSet, "catalog")
MyDataR = MyCom.ExecuteReader()
DataGrid.DataSource = MyDataSet.Tables("catalog")
DeleteCatNum.DataSource = MyDataR
DeleteCatNum.DataTextField = "cat_num"
DeleteCatNum.DataValueField = "cat_num"
UpdateCatNum.DataSource = MyDataR
UpdateCatNum.DataTextField = "cat_num"
UpdateCatNum.DataValueField = "cat_num"
‘UpdateCatNum.DataSource = MyDataSet.Tables("catalog")
‘DeleteCatNum.DataSource = MyDataSet.Tables("catalog")
DataGrid.DataBind()
UpdateCatNum.DataBind()
DeleteCatNum.DataBind()
MyDataR.Close()
MyConn.Close()
End Sub
Sub Populate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)
LoadData()
End Sub
Sub UpdateSetup(ByVal sender As Object, ByVal e As System.EventArgs)
Dim SelectCat As String = UpdateCatNum.SelectedItem.Value
Dim MyConn As SqlConnection
Dim MyCom As SqlCommand
Dim MyDataRead As SqlDataReader
UpdateSelect.Visible = "False"
UpdateTextBoxes.Visible = "True"
UpdateButton.CommandArgument = SelectCat
MyConn = New SqlConnection("Data Source=iffv25.db.4335434.hostedresource.com; Initial Catalog=iffv25; User ID=iffv25; Password=’Chrte45′;")
MyConn.Open()
MyCom = New SqlCommand("Select cat_category, cat_style, cat_brand, cat_color, cat_magnitude, cat_size, cat_price, cat_link From catalog Where cat_num = " + _
SelectCat, MyConn)
MyDataRead = MyCom.ExecuteReader()
MyDataRead.Read()
UpdateCategory.Text = MyDataRead("cat_category")
UpdateStyle.Text = MyDataRead("cat_style")
UpdateBrand.Text = MyDataRead("cat_brand")
UpdateColor.Text = MyDataRead("cat_color")
UpdateMag.Text = MyDataRead("cat_magnitude")
UpdateSize.Text = MyDataRead("cat_size")
UpdatePrice.Text = MyDataRead("cat_price")
UpdateLink.Text = MyDataRead("cat_link")
MyDataRead.Close()
MyConn.Close()
End Sub
Sub UpdateReset(ByVal sender As Object, ByVal e As System.EventArgs)
UpdateSelect.Visible = "True"
UpdateTextBoxes.Visible = "False"
LoadData()
End Sub
Sub Catalog_Function(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs)
Dim Action As String = e.CommandName
Dim Id As Integer
Dim Category As String
Dim Style As String
Dim Brand As String
Dim Color As String
Dim Mag As Integer
Dim Size As Decimal
Dim Price As Decimal
Dim Link As String
Category = ""
Style = ""
Brand = ""
Color = ""
Link = ""
Select Case Action
Case "Insert"
Category = InsertCategory.Text
Style = InsertStyle.Text
Brand = InsertBrand.Text
Color = InsertColor.Text
Mag = InsertMag.Text
Size = InsertSize.Text
Price = InsertPrice.Text
Link = InsertLink.Text
Case "Update"
Category = UpdateCategory.Text
Style = UpdateStyle.Text
Brand = UpdateBrand.Text
Color = UpdateColor.Text
If you have two questions, please ask two questions.
You can only have one web.config file for a given application; each GoDaddy hosting plan is a single application. Therefore, you can only have one web.config file, and it must be in the root directory of your site.