Something wrong when xml control is not showing data

Discussion in 'ASP .Net' started by Aaron, Jan 2, 2006.

  1. Aaron

    Aaron Guest

    Hello,

    I am using VB/ASP.net 2005. When I click submit it refreshes the page without entering the data from all the text boxes and not entering in the Game1.xml.

    here is the asp.vb code
    Imports System.Xml

    Partial Class _game1

    Inherits Web.UI.Page

    ...............

    Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click

    Dim xDoc As New XmlDocument

    xDoc.Load(Request.MapPath("game1.xml"))

    Dim newComment As XmlDocumentFragment = xDoc.CreateDocumentFragment()

    newComment.InnerXml = "<Game>" + _

    "<Wname>" + Server.HtmlEncode(txtWName.Text) + "</Wname>" + _

    "<Bname>" + Server.HtmlEncode(txtBName.Text) + "</Bname>" + _

    "<date>" + Server.HtmlEncode(txtDate.Text) + "</date>" + _

    "<opening>" + Server.HtmlEncode(txtOpening.Text) + "</opening>" + _

    ...........

    ...........

    ...........

    "</Game>"

    Dim root As XmlElement = xDoc.DocumentElement

    root.AppendChild(newComment)

    xDoc.Save(Request.MapPath("game1.xml"))

    Response.Redirect(".....")

    End Sub

    .........

    End Class



    TIA
     
    Aaron, Jan 2, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ray Booysen
    Replies:
    2
    Views:
    663
    Ray Booysen
    Mar 28, 2006
  2. Replies:
    3
    Views:
    985
    Mark Parnell
    Oct 14, 2005
  3. cms3023
    Replies:
    0
    Views:
    425
    cms3023
    May 20, 2007
  4. Lorenzo

    Help me understand what is wrong (Data not showing)

    Lorenzo, Dec 28, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    123
    addup
    Dec 28, 2005
  5. David R
    Replies:
    4
    Views:
    127
    David R
    Dec 6, 2005
Loading...

Share This Page