.Net Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - More.Net Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 12th, 2012, 01:24 PM
stillblazin stillblazin is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2010
Posts: 32 stillblazin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 54 m 12 sec
Reputation Power: 4
Posting Form From Aspx.vb to Asp

I'm creating a dynamic form in javascript on an aspx.vb file using clientstartupscript.

I just can't get it to submit/post to the asp page from aspx.vb

The asp page expects to get the variables from the form object. request.form("1")

I am creating a form, with a input type and name/id of "1"... but its just not submitting.

Fiddler is throwing me a 200 status, and I'm not getting any errors.
It just won't go to the page!

I tried... creating a normal html page and using this exact dynamic form and i tried to manually post to asp and it worked as a sample!.. but from aspx.. something is not right!

Please help. See Code Below:
startpage.aspx.vb
Code:
            "var f = document.createElement('form'); " & _
            "var r = document.createElement('input'); " & _
            "r.type = 'hidden'; " & _
            "r.name = '1'; " & _
            "r.value = " + rid + "; " & _
            "f.appendChild(r); " & _
            "var mq = document.createElement('input'); " & _
            "mq.type = 'hidden'; " & _
            "mq.name = '3'; " & _
            "mq.value = " + qtotal + "; " & _
            "f.method = 'POST'; " & _
            "f.action = 'targetpage.asp'; " & _
            "alert('Submitting to SelExit'); " & _
            "f.submit(); " 
Page.ClientScript.RegisterStartupScript(Me.GetType(), "ClientScript", javstring, True)

end page/ target page .asp
Code:
request.form("1")
request.form("3")

It got to the submitted to selexit alert box, but then went no where, just got stuck in the start page. blank screen.. no errors.. whathef

Last edited by stillblazin : January 12th, 2012 at 01:27 PM.

Reply With Quote
  #2  
Old January 12th, 2012, 02:13 PM
stillblazin stillblazin is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2010
Posts: 32 stillblazin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 54 m 12 sec
Reputation Power: 4
This is resolved.. I had to have a dummy form in the aspx page..
as well for this to work.. so weird. This dummy form has the action attribute set.. and runat = server, not sure if those are required but its working!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - More.Net Development > Posting Form From Aspx.vb to Asp

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap