DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Asp:TextBox and AJAX

Hybrid View

  1. #1
    Join Date
    Jul 2007
    Posts
    2

    Asp:TextBox and AJAX

    I'm trying to do something that seems really simple but is giving big problems.

    I have a div in my page that represents the main content of my webpage. I want to load up a page into this section using AJAX, and it will load different content depending on user interaction.


    I have user input in other parts of this primary html file that is done with asp:textbox, so the whole page contains one large <form runat=server> tag so that I can include my asp:textbox.

    However. I want some of my dynamic content to have asp:textbox's as well.

    The problem is, if I include a <form runat=server> in html that I pull down through AJAX, then the page has an error b/c its trying to create a form element inside of another form elemtn.

    Alternatively, if I leave out the <form runat=server> on the html that I pull down through ajax, the ASP server throws an error message saying I need the <form tag, and that error page displays in my main content div which is loaded through the ajax.



    Is there a solution to this problem?

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    I think you'll have to download the dynamic content into a client-side variable, then use JavaScript to extract the content between the <body> tags and copy it into your <div>.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. AJAX and ASP:TextBox
    By jam851 in forum AJAX
    Replies: 0
    Last Post: 07-09-2007, 10:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center