Adding Button Programmatically REDUX - STILL NONFUNCTIONAL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Neo Geshel

    Adding Button Programmatically REDUX - STILL NONFUNCTIONAL

    Greetings.

    I am in a very big pickle. I am trying to add page content - as well as
    a submit button - programatically to a web form that is supposed to
    submit to DB and then refresh.

    That is, a user goes to the web page, which draws the current content
    out of the db and inserts into a "preview" area as well as the form
    itself. User makes changes, hits submit button. The page *should*
    refresh, with the changes saved to the db, and the new content in the
    preview area and in the form.

    What happens is that the entire "content" section of the page vanishes.
    Everything. Boom. Poof. Bye-bye. It's as if the sub that catches the
    button action simply doesn't fire. And when I refresh the page, the
    original content - not the changed content - comes back up, *proving*
    that the database insert of the changed content FAILED TO FIRE.

    Below is the code-behind that I am using:

    Imports System
    'Imports System.Configur ation
    Imports System.Data
    Imports System.Data.Ole Db
    'Imports System.Drawing
    'Imports System.Drawing. Imaging
    'Imports System.IO
    'Imports System.Web.Secu rity
    Imports System.Web.UI
    Imports System.Web.UI.W ebControls
    Imports System.Web.UI.H TMLControls

    Public Class TeamMetz
    Inherits Page
    Dim vbCrLf As String = Microsoft.Visua lBasic.vbCrLf
    Dim strYear As String = DateTime.Now.Ye ar.ToString()
    Dim strWarning As String = vbCrLf & " <p>Have you <a
    href=""/rules.aspx"">re ad the rules</a> for adding content? Do you know
    how to <a href=""/formatting.aspx "">properly format text</a>?</p>" & vbCrLf
    Dim myForm As New HTMLForm
    Dim myConn As New
    OleDbConnection (System.Configu ration.Configur ationSettings.A ppSettings("str Conn"))

    Protected Sub Page_Load(sende r As Object, e As EventArgs)
    Dim strURL as String = Request.RawURL. ToString()
    Dim strDO as String = Request.QuerySt ring("do")
    Dim intID as Integer = Request.QuerySt ring("id")
    Dim strP as String = Request.QuerySt ring("parent")
    Dim strC as String = Request.QuerySt ring("child")
    Dim strG as String = Request.QuerySt ring("gchild")
    Dim intE as Integer = Request.QuerySt ring("entry")
    Controls.Add(Ne w LiteralControl( " ... ")) 'sets up the opening
    HTML, the meta tags and the page header.
    If Not IsPostBack Then
    Select Case strDo
    Case "add"
    Case "edit"
    Case "delete"
    Case "intro"
    LoadIntro()
    Case Else
    Controls.Add(Ne w LiteralControl( " <h2>Welcome</h2>" & strWarning & "
    <p>Please choose a task from the following list:</p>" & vbCrLf & " <ul>"
    & vbCrLf & " <li><a href=""/default.aspx?do =add"">Add Data</a> to the
    database</li>" & vbCrLf & " <li><a href=""/default.aspx?do =edit"">Edit
    Data</a> in the database</li>" & vbCrLf & " <li><a
    href=""/default.aspx?do =intro"">Edit Intro</a> on the front page</li>" &
    vbCrLf & " </ul>"))
    End Select
    End If
    Controls.Add(Ne w LiteralControl( " ... ")) 'sets up the page footer
    and the closing HTML
    End Sub

    Sub LoadIntro()
    Controls.Add(Ne w LiteralControl( " <h2>Edit Intro</h2>" & strWarning))
    myForm.ID = "myForm"
    Controls.Add(my Form)
    Dim myCmd as New OleDbCommand("S ELECT [Comment] FROM [tblIntro]",
    myConn)
    myConn.Open()
    myForm.Controls .Add(New LiteralControl( " <p>This is what is
    currently in the Database:</p>" & vbCrLf & " <blockquote>" & vbCrLf & "
    <p>" & FormatData(myCm d.ExecuteScalar ()) & "</p>" & vbCrLf & "
    </blockquote>" & vbCrLf & " <p>Use the form below to edit the contents
    of the database and submit the changes:</p>" & vbCrLf & " <div
    class=""center" ">" & vbCrLf & " "))
    Dim textarea As New TextBox
    textarea.id = "IntroComme nt"
    textarea.Text = myCmd.ExecuteSc alar()
    textarea.Rows = "8"
    textarea.Column s = "80"
    textarea.TextMo de = TextBoxMode.Mul tiLine
    textarea.Wrap = true
    myForm.Controls .Add(textarea)
    myForm.Controls .Add(New LiteralControl( "<br />" & vbCrLf & " "))
    Dim submit As New Button
    AddHandler submit.Click, AddressOf UpdateIntro
    submit.id = "submit"
    submit.Text = "Update Intro"
    myForm.Controls .Add(submit)
    myForm.Controls .Add(New LiteralControl( vbCrLf & " </div>" & vbCrLf))
    myConn.Close()
    End Sub
    Sub UpdateIntro(sen der As Object, e As System.EventArg s)
    Dim myCmd as New OleDbCommand("U PDATE tblIntro SET
    [Comment]=@Comment", myConn)
    myConn.Open()
    myCmd.CommandTy pe = CommandType.Tex t
    myCmd.Parameter s.Add("@Comment ", OleDbType.LongV arWChar).Value =
    RepChar(Request .Form("IntroCom ment"))
    myCmd.ExecuteNo nQuery()
    myConn.Close()
    LoadIntro()
    End Sub

    Function FormatDate(sIte m as Object) as String
    Return String.Format(" <p class=""small"" >Posted: <i>{0:dddd, dd
    MMMMM, yyyy}</i></p>", sItem)
    End Function
    Function FormatData(sIte m) as String
    FormatData=sIte m.Replace(vbcrl f,"</p>" & vbCrLf & "
    <p>").Replace ("","<b>").Replac e("","</b>").Replace( "","<i>").Replac e("","</i>").Replace(" </p>"
    & vbCrLf & " <p>
    • </p>" & vbCrLf & " <p>[item]","</p>" & vbCrLf & "
      <ul>" & vbCrLf & " <li>").Replace( "</p>" & vbCrLf & "
      <p>[item]","</li>" & vbCrLf & " <li>").Replace( "</p>" & vbCrLf & "
      <p>
    ","</li>" & vbCrLf & " </ul>" & vbCrLf)
    End Function
    Function RepChar(sItem) as String
    RepChar=sItem.R eplace("'","’ ").Replace( " & ", " &amp;
    ").Replace("<", "&lt;").Replace (">","&gt;")
    End Function

    End Class


    As you can see, the *logical* progression of events is that the page is
    loaded, the user clicks on "edit intro", the edit intro page comes up
    (complete with preview area and pre-filled form). The user then makes
    changes, and the button gets clicked.

    The button *should* call UpdateIntro(), but it clearly does not, since
    the DB never gets updated. WHY? WHY? WHY? Why does the DB not update???

    The LoadIntro() clearly has the button referencing the UpdateIntro()
    sub, but that sub fails to fire when the page gets submitted. It's like
    that sub is completely ignored.

    WHY?

    TIA.
    ...Geshel
    --
    *************** *************** *************** *************** ***********
    * My reply-to is an automatically monitored spam honeypot. Do not use *
    * it unless you want to be blacklisted by SpamCop. Please reply to my *
    * first name at my last name dot org. *
    *************** *************** *************** *************** ***********
    * “I contend that we are both atheists. I just believe in one fewer *
    * god than you do. When you understand why you dismiss all the other *
    * possible gods, you will understand why I dismiss yours.” *
    * - Stephen F. Roberts *
    *************** *************** *************** *************** ***********
    * “Anyone who believes in Intelligent Design (“creationism ”) is just *
    * as ignorant, irrational and ill-educated as someone who believes *
    * that the world is a flat disc, that the Sun circles the Earth or *
    * that there really is a tooth fairy. Darwinism has an overwhelming *
    * foundation of evidence that can be tested and reproduced. *
    * *
    * “Intelligent Design, on the other hand, has no evidence at all;not *
    * one single shred of testable proof. As such, Intelligent Design is *
    * Religious Mythology, and has no right whatsoever to be in our *
    * Science classrooms.” - 99.99+% of Scientists *
    *************** *************** *************** *************** ***********
    Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
    obsessed with sex as the average man.” Unfortunately, since true
    nymphomaniacs are so rare, this means that it takes an extraordinary
    woman to keep up with an ordinary man.
    *************** *************** *************** *************** ***********
  • Ken Cox - Microsoft MVP

    #2
    Re: Adding Button Programmaticall y REDUX - STILL NONFUNCTIONAL

    Are you trying to insert a form within a form in ASP.NET? If so, it will
    crash.


    "Neo Geshel" <gotcha@geshel. org> wrote in message
    news:HE1Rf.1374 11$H%4.1494@pd7 tw2no...
    Greetings.

    I am in a very big pickle. I am trying to add page content - as well as
    a submit button - programatically to a web form that is supposed to
    submit to DB and then refresh.

    That is, a user goes to the web page, which draws the current content
    out of the db and inserts into a "preview" area as well as the form
    itself. User makes changes, hits submit button. The page *should*
    refresh, with the changes saved to the db, and the new content in the
    preview area and in the form.

    What happens is that the entire "content" section of the page vanishes.
    Everything. Boom. Poof. Bye-bye. It's as if the sub that catches the
    button action simply doesn't fire. And when I refresh the page, the
    original content - not the changed content - comes back up, *proving*
    that the database insert of the changed content FAILED TO FIRE.

    Below is the code-behind that I am using:

    Imports System
    'Imports System.Configur ation
    Imports System.Data
    Imports System.Data.Ole Db
    'Imports System.Drawing
    'Imports System.Drawing. Imaging
    'Imports System.IO
    'Imports System.Web.Secu rity
    Imports System.Web.UI
    Imports System.Web.UI.W ebControls
    Imports System.Web.UI.H TMLControls

    Public Class TeamMetz
    Inherits Page
    Dim vbCrLf As String = Microsoft.Visua lBasic.vbCrLf
    Dim strYear As String = DateTime.Now.Ye ar.ToString()
    Dim strWarning As String = vbCrLf & " <p>Have you <a
    href=""/rules.aspx"">re ad the rules</a> for adding content? Do you know
    how to <a href=""/formatting.aspx "">properly format text</a>?</p>" & vbCrLf
    Dim myForm As New HTMLForm
    Dim myConn As New
    OleDbConnection (System.Configu ration.Configur ationSettings.A ppSettings("str Conn"))

    Protected Sub Page_Load(sende r As Object, e As EventArgs)
    Dim strURL as String = Request.RawURL. ToString()
    Dim strDO as String = Request.QuerySt ring("do")
    Dim intID as Integer = Request.QuerySt ring("id")
    Dim strP as String = Request.QuerySt ring("parent")
    Dim strC as String = Request.QuerySt ring("child")
    Dim strG as String = Request.QuerySt ring("gchild")
    Dim intE as Integer = Request.QuerySt ring("entry")
    Controls.Add(Ne w LiteralControl( " ... ")) 'sets up the opening
    HTML, the meta tags and the page header.
    If Not IsPostBack Then
    Select Case strDo
    Case "add"
    Case "edit"
    Case "delete"
    Case "intro"
    LoadIntro()
    Case Else
    Controls.Add(Ne w LiteralControl( " <h2>Welcome</h2>" & strWarning & "
    <p>Please choose a task from the following list:</p>" & vbCrLf & " <ul>"
    & vbCrLf & " <li><a href=""/default.aspx?do =add"">Add Data</a> to the
    database</li>" & vbCrLf & " <li><a href=""/default.aspx?do =edit"">Edit
    Data</a> in the database</li>" & vbCrLf & " <li><a
    href=""/default.aspx?do =intro"">Edit Intro</a> on the front page</li>" &
    vbCrLf & " </ul>"))
    End Select
    End If
    Controls.Add(Ne w LiteralControl( " ... ")) 'sets up the page footer
    and the closing HTML
    End Sub

    Sub LoadIntro()
    Controls.Add(Ne w LiteralControl( " <h2>Edit Intro</h2>" & strWarning))
    myForm.ID = "myForm"
    Controls.Add(my Form)
    Dim myCmd as New OleDbCommand("S ELECT [Comment] FROM [tblIntro]",
    myConn)
    myConn.Open()
    myForm.Controls .Add(New LiteralControl( " <p>This is what is
    currently in the Database:</p>" & vbCrLf & " <blockquote>" & vbCrLf & "
    <p>" & FormatData(myCm d.ExecuteScalar ()) & "</p>" & vbCrLf & "
    </blockquote>" & vbCrLf & " <p>Use the form below to edit the contents
    of the database and submit the changes:</p>" & vbCrLf & " <div
    class=""center" ">" & vbCrLf & " "))
    Dim textarea As New TextBox
    textarea.id = "IntroComme nt"
    textarea.Text = myCmd.ExecuteSc alar()
    textarea.Rows = "8"
    textarea.Column s = "80"
    textarea.TextMo de = TextBoxMode.Mul tiLine
    textarea.Wrap = true
    myForm.Controls .Add(textarea)
    myForm.Controls .Add(New LiteralControl( "<br />" & vbCrLf & " "))
    Dim submit As New Button
    AddHandler submit.Click, AddressOf UpdateIntro
    submit.id = "submit"
    submit.Text = "Update Intro"
    myForm.Controls .Add(submit)
    myForm.Controls .Add(New LiteralControl( vbCrLf & " </div>" & vbCrLf))
    myConn.Close()
    End Sub
    Sub UpdateIntro(sen der As Object, e As System.EventArg s)
    Dim myCmd as New OleDbCommand("U PDATE tblIntro SET
    [Comment]=@Comment", myConn)
    myConn.Open()
    myCmd.CommandTy pe = CommandType.Tex t
    myCmd.Parameter s.Add("@Comment ", OleDbType.LongV arWChar).Value =
    RepChar(Request .Form("IntroCom ment"))
    myCmd.ExecuteNo nQuery()
    myConn.Close()
    LoadIntro()
    End Sub

    Function FormatDate(sIte m as Object) as String
    Return String.Format(" <p class=""small"" >Posted: <i>{0:dddd, dd
    MMMMM, yyyy}</i></p>", sItem)
    End Function
    Function FormatData(sIte m) as String
    FormatData=sIte m.Replace(vbcrl f,"</p>" & vbCrLf & "
    <p>").Replace ("","<b>").Replac e("","</b>").Replace( "","<i>").Replac e("","</i>").Replace(" </p>"
    & vbCrLf & " <p>
    • </p>" & vbCrLf & " <p>[item]","</p>" & vbCrLf & "
      <ul>" & vbCrLf & " <li>").Replace( "</p>" & vbCrLf & "
      <p>[item]","</li>" & vbCrLf & " <li>").Replace( "</p>" & vbCrLf & "
      <p>
    ","</li>" & vbCrLf & " </ul>" & vbCrLf)
    End Function
    Function RepChar(sItem) as String
    RepChar=sItem.R eplace("'","'") .Replace(" & ", " &amp;
    ").Replace("<", "&lt;").Replace (">","&gt;")
    End Function

    End Class


    As you can see, the *logical* progression of events is that the page is
    loaded, the user clicks on "edit intro", the edit intro page comes up
    (complete with preview area and pre-filled form). The user then makes
    changes, and the button gets clicked.

    The button *should* call UpdateIntro(), but it clearly does not, since
    the DB never gets updated. WHY? WHY? WHY? Why does the DB not update???

    The LoadIntro() clearly has the button referencing the UpdateIntro()
    sub, but that sub fails to fire when the page gets submitted. It's like
    that sub is completely ignored.

    WHY?

    TIA.
    ....Geshel
    --
    *************** *************** *************** *************** ***********
    * My reply-to is an automatically monitored spam honeypot. Do not use *
    * it unless you want to be blacklisted by SpamCop. Please reply to my *
    * first name at my last name dot org. *
    *************** *************** *************** *************** ***********
    * "I contend that we are both atheists. I just believe in one fewer *
    * god than you do. When you understand why you dismiss all the other *
    * possible gods, you will understand why I dismiss yours." *
    * - Stephen F. Roberts *
    *************** *************** *************** *************** ***********
    * "Anyone who believes in Intelligent Design ("creationis m") is just *
    * as ignorant, irrational and ill-educated as someone who believes *
    * that the world is a flat disc, that the Sun circles the Earth or *
    * that there really is a tooth fairy. Darwinism has an overwhelming *
    * foundation of evidence that can be tested and reproduced. *
    * *
    * "Intelligen t Design, on the other hand, has no evidence at all; not *
    * one single shred of testable proof. As such, Intelligent Design is *
    * Religious Mythology, and has no right whatsoever to be in our *
    * Science classrooms." - 99.99+% of Scientists *
    *************** *************** *************** *************** ***********
    Mignon McLaughlin once said that "A nymphomaniac is a woman [who is] as
    obsessed with sex as the average man." Unfortunately, since true
    nymphomaniacs are so rare, this means that it takes an extraordinary
    woman to keep up with an ordinary man.
    *************** *************** *************** *************** ***********


    Comment

    • Neo Geshel

      #3
      Re: Adding Button Programmaticall y REDUX - STILL NONFUNCTIONAL

      Ken Cox - Microsoft MVP wrote:[color=blue]
      > Are you trying to insert a form within a form in ASP.NET? If so, it will
      > crash.[/color]

      Ummm.... no. Didn't you read what I wrote?

      On the first viewing of the page (If Not IsPostBack Then), when
      do=intro, the sub LoadIntro() is called. This extracts data from the
      database, and puts it into a preview section, as well as directly into a
      form for editing.

      When the contents of the form are edited and submitted, the sub
      UpdateIntro() is *supposed* to fire. It is *supposed* to take the form
      contents, and submit them to the database, before calling the sub
      LoadIntro().

      The problem is, the submit button of the form FAILS TO CALL THE
      UPDATEINTRO() SUB, and so THE DATABASE INSERT FAILS TO OCCUR, and the
      reloading of the preview/filled form also fails to occur.

      BTW, the only contents of my main page is the page attribute. I am
      dynamically loading all of the page contents (<html>, <title></title>,
      <page>, </page>, </html>, etc.) from the code-behind. I intend to
      compile the results once I get it working.

      TIA.
      ...Geshel
      --
      *************** *************** *************** *************** ***********
      * My reply-to is an automatically monitored spam honeypot. Do not use *
      * it unless you want to be blacklisted by SpamCop. Please reply to my *
      * first name at my last name dot org. *
      *************** *************** *************** *************** ***********
      * “I contend that we are both atheists. I just believe in one fewer *
      * god than you do. When you understand why you dismiss all the other *
      * possible gods, you will understand why I dismiss yours.” *
      * - Stephen F. Roberts *
      *************** *************** *************** *************** ***********
      * “Anyone who believes in Intelligent Design (“creationism ”) is just *
      * as ignorant, irrational and ill-educated as someone who believes *
      * that the world is a flat disc, that the Sun circles the Earth or *
      * that there really is a tooth fairy. Darwinism has an overwhelming *
      * foundation of evidence that can be tested and reproduced. *
      * *
      * “Intelligent Design, on the other hand, has no evidence at all;not *
      * one single shred of testable proof. As such, Intelligent Design is *
      * Religious Mythology, and has no right whatsoever to be in our *
      * Science classrooms.” - 99.99+% of Scientists *
      *************** *************** *************** *************** ***********
      Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
      obsessed with sex as the average man.” Unfortunately, since true
      nymphomaniacs are so rare, this means that it takes an extraordinary
      woman to keep up with an ordinary man.
      *************** *************** *************** *************** ***********

      Comment

      • Neo Geshel

        #4
        Re: Adding Button Programmaticall y REDUX - STILL NONFUNCTIONAL

        Neo Geshel wrote:[color=blue]
        > Ken Cox - Microsoft MVP wrote:[color=green]
        >> Are you trying to insert a form within a form in ASP.NET? If so, it
        >> will crash.[/color]
        >
        > Ummm.... no. Didn't you read what I wrote?
        >
        > On the first viewing of the page (If Not IsPostBack Then), when
        > do=intro, the sub LoadIntro() is called. This extracts data from the
        > database, and puts it into a preview section, as well as directly into a
        > form for editing.
        >
        > When the contents of the form are edited and submitted, the sub
        > UpdateIntro() is *supposed* to fire. It is *supposed* to take the form
        > contents, and submit them to the database, before calling the sub
        > LoadIntro().
        >
        > The problem is, the submit button of the form FAILS TO CALL THE
        > UPDATEINTRO() SUB, and so THE DATABASE INSERT FAILS TO OCCUR, and the
        > reloading of the preview/filled form also fails to occur.
        >
        > BTW, the only contents of my main page is the page attribute. I am
        > dynamically loading all of the page contents (<html>, <title></title>,
        > <page>, </page>, </html>, etc.) from the code-behind. I intend to
        > compile the results once I get it working.
        >
        > TIA.
        > ...Geshel[/color]

        As an addendum, here is how the HTML ends up in the browser's source
        preview window:

        <h2>Edit Intro</h2>
        <p>Have you <a href="/rules.aspx">rea d the rules</a> for adding
        content? Do you know how to <a href="/formatting.aspx ">properly format
        text</a>?</p>
        <form name="myForm" method="post" action="default .aspx?do=intro"
        id="myForm">
        <input type="hidden" name="__VIEWSTA TE"
        value="dDw1Mzgx Ozs+m5H4fRpTaPk fBKkPgV/0vEOzo+4=" />
        <p>This is what is currently in the Database:</p>
        <blockquote>
        <p> ... Contents of Intro, with proper formatting ...</p>
        </blockquote>
        <p>Use the form below to edit the contents of the database and submit
        the changes:</p>
        <div class="center">
        <textarea name="IntroComm ent" rows="8" cols="80" id="IntroCommen t">
        ... Contents of Intro, withOUT proper formatting ... </textarea><br />

        <input type="submit" name="submit" value="Update Intro" id="submit" />
        </div>
        </form>

        This is what *should* be coming up *every time* for that page, even
        *after* clicking on the submit button. What I have noticed is that the
        textarea and the submit button don't have their usual viewstate-munged
        Id's. Their ID's are plain, as if viewstate was turned off.

        ...Geshel
        --
        *************** *************** *************** *************** ***********
        * My reply-to is an automatically monitored spam honeypot. Do not use *
        * it unless you want to be blacklisted by SpamCop. Please reply to my *
        * first name at my last name dot org. *
        *************** *************** *************** *************** ***********
        * “I contend that we are both atheists. I just believe in one fewer *
        * god than you do. When you understand why you dismiss all the other *
        * possible gods, you will understand why I dismiss yours.” *
        * - Stephen F. Roberts *
        *************** *************** *************** *************** ***********
        * “Anyone who believes in Intelligent Design (“creationism ”) is just *
        * as ignorant, irrational and ill-educated as someone who believes *
        * that the world is a flat disc, that the Sun circles the Earth or *
        * that there really is a tooth fairy. Darwinism has an overwhelming *
        * foundation of evidence that can be tested and reproduced. *
        * *
        * “Intelligent Design, on the other hand, has no evidence at all;not *
        * one single shred of testable proof. As such, Intelligent Design is *
        * Religious Mythology, and has no right whatsoever to be in our *
        * Science classrooms.” - 99.99+% of Scientists *
        *************** *************** *************** *************** ***********
        Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
        obsessed with sex as the average man.” Unfortunately, since true
        nymphomaniacs are so rare, this means that it takes an extraordinary
        woman to keep up with an ordinary man.
        *************** *************** *************** *************** ***********

        Comment

        • Ken Cox - Microsoft MVP

          #5
          Re: Adding Button Programmaticall y REDUX - STILL NONFUNCTIONAL

          Well the error I got with your codes was

          Exception Details: System.Web.Http Exception: A page can have only one
          server-side Form tag.


          "Neo Geshel" <gotcha@geshel. org> wrote in message
          news:Ku2Rf.1374 63$H%4.111154@p d7tw2no...
          Ken Cox - Microsoft MVP wrote:[color=blue]
          > Are you trying to insert a form within a form in ASP.NET? If so, it will
          > crash.[/color]

          Ummm.... no. Didn't you read what I wrote?

          On the first viewing of the page (If Not IsPostBack Then), when
          do=intro, the sub LoadIntro() is called. This extracts data from the
          database, and puts it into a preview section, as well as directly into a
          form for editing.

          When the contents of the form are edited and submitted, the sub
          UpdateIntro() is *supposed* to fire. It is *supposed* to take the form
          contents, and submit them to the database, before calling the sub
          LoadIntro().

          The problem is, the submit button of the form FAILS TO CALL THE
          UPDATEINTRO() SUB, and so THE DATABASE INSERT FAILS TO OCCUR, and the
          reloading of the preview/filled form also fails to occur.

          BTW, the only contents of my main page is the page attribute. I am
          dynamically loading all of the page contents (<html>, <title></title>,
          <page>, </page>, </html>, etc.) from the code-behind. I intend to
          compile the results once I get it working.

          TIA.
          ....Geshel
          --
          *************** *************** *************** *************** ***********
          * My reply-to is an automatically monitored spam honeypot. Do not use *
          * it unless you want to be blacklisted by SpamCop. Please reply to my *
          * first name at my last name dot org. *
          *************** *************** *************** *************** ***********
          * "I contend that we are both atheists. I just believe in one fewer *
          * god than you do. When you understand why you dismiss all the other *
          * possible gods, you will understand why I dismiss yours." *
          * - Stephen F. Roberts *
          *************** *************** *************** *************** ***********
          * "Anyone who believes in Intelligent Design ("creationis m") is just *
          * as ignorant, irrational and ill-educated as someone who believes *
          * that the world is a flat disc, that the Sun circles the Earth or *
          * that there really is a tooth fairy. Darwinism has an overwhelming *
          * foundation of evidence that can be tested and reproduced. *
          * *
          * "Intelligen t Design, on the other hand, has no evidence at all; not *
          * one single shred of testable proof. As such, Intelligent Design is *
          * Religious Mythology, and has no right whatsoever to be in our *
          * Science classrooms." - 99.99+% of Scientists *
          *************** *************** *************** *************** ***********
          Mignon McLaughlin once said that "A nymphomaniac is a woman [who is] as
          obsessed with sex as the average man." Unfortunately, since true
          nymphomaniacs are so rare, this means that it takes an extraordinary
          woman to keep up with an ordinary man.
          *************** *************** *************** *************** ***********


          Comment

          • Neo Geshel

            #6
            Re: Adding Button Programmaticall y REDUX - STILL NONFUNCTIONAL

            Ken Cox - Microsoft MVP wrote:[color=blue]
            > Well the error I got with your codes was
            >
            > Exception Details: System.Web.Http Exception: A page can have only one
            > server-side Form tag.[/color]

            Well, there is only one instance of a FORM tag that was dynamically
            created, as you can see from the code-behind. Where was your second FORM
            tag coming from??

            Remember, the only thing on the ASPX page was the @page directive.
            Nothing else.

            ...Geshel
            --
            *************** *************** *************** *************** ***********
            * My reply-to is an automatically monitored spam honeypot. Do not use *
            * it unless you want to be blacklisted by SpamCop. Please reply to my *
            * first name at my last name dot org. *
            *************** *************** *************** *************** ***********
            * “I contend that we are both atheists. I just believe in one fewer *
            * god than you do. When you understand why you dismiss all the other *
            * possible gods, you will understand why I dismiss yours.” *
            * - Stephen F. Roberts *
            *************** *************** *************** *************** ***********
            * “Anyone who believes in Intelligent Design (“creationism ”) is just *
            * as ignorant, irrational and ill-educated as someone who believes *
            * that the world is a flat disc, that the Sun circles the Earth or *
            * that there really is a tooth fairy. Darwinism has an overwhelming *
            * foundation of evidence that can be tested and reproduced. *
            * *
            * “Intelligent Design, on the other hand, has no evidence at all;not *
            * one single shred of testable proof. As such, Intelligent Design is *
            * Religious Mythology, and has no right whatsoever to be in our *
            * Science classrooms.” - 99.99+% of Scientists *
            *************** *************** *************** *************** ***********
            Mignon McLaughlin once said that “A nymphomaniac is a woman [who is] as
            obsessed with sex as the average man.” Unfortunately, since true
            nymphomaniacs are so rare, this means that it takes an extraordinary
            woman to keep up with an ordinary man.
            *************** *************** *************** *************** ***********

            Comment

            Working...