Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
Why do I get different results from the form post method "GET" vs. the "POST" method in the following?
Home
Education
Why do I get different results from the form post...
asked
Feb 15, 2022
in
Education
by
JackTerrance
I have the following HTML/ASP.NET code: Ny test
Name:
<%if (Request.Form["submit"] != null) { Response.Write("<br/>"); Response.Write("Submit button pushed"); } if (Request.Form["navn"] != null && Request.Form["navn"] != "") { Response.Write("
"); Response.Write("Name OK"); } %> When using the "POST" form post method I get the following output: Submit button pushed Name OK When using the "GET" form post method NOTHING is printed out?! JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)
asp
nethtmlformspost
1
Answer
0
votes
answered
Feb 15, 2022
by
JackTerrance
Request.Form contains information that is sent using POST. When you use GET the information will be in the Request.QueryString collection. In your case this means that Request.Form["submit"] is null. If you want to support both then you would be able to use the Request.Item collection which includes values from: Request.Cookies Request.Form Request.QueryString Request.ServerVariables However, doing this you may get some unexpected results if you use a parameter name that is used in one of the other collections.
Related questions
0
votes
Q: aspnet_compiler as a post-build event is encountering IIS error on an empty MVC3 app
I am running aspnet_compiler as a post-build event, using the following command: aspnet_compiler.exe -v / - ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 26, 2022
in
Education
by
JackTerrance
asp
net-mvc-3
0
votes
Q: CQRS Commands as Models for POST actions
I'm getting started with CQRS, and thought It would make the most sense to use the Command object ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Feb 24, 2022
in
Education
by
JackTerrance
asp
net-mvc-3cqrs
0
votes
Q: Web authentication state - Session vs Cookie?
What's the best way to authenticate and track user authentication state from page to page? Some say session ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 10, 2022
in
Education
by
JackTerrance
asp
netsecurityauthenticationcookies
0
votes
Q: Experiences using software load balancing vs. a hardware load balancer?
The ASP.NET application that I am currently responsible for at my day job has hit its limit in terms ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 5, 2022
in
Education
by
JackTerrance
asp
netscalability
0
votes
Q: Experiences using software load balancing vs. a hardware load balancer?
The ASP.NET application that I am currently responsible for at my day job has hit its limit in terms ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 5, 2022
in
Education
by
JackTerrance
asp
netscalability
0
votes
Q: How to interact between Web App and Windows Form Application
I have a problem where a Web Application needs to (after interaction from the user via Javascript) 1) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 18, 2022
in
Education
by
JackTerrance
asp
netwinforms
0
votes
Q: How do I change the title and other html-elements in the head of a HTML-document in Razor Components?
I'm fairly new to Razor Components and I would like to change the title and other data inside the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
May 26, 2022
in
Education
by
JackTerrance
asp
net-coreblazor-server-side
0
votes
Q: how do I create an array or list of ASP.NET checkboxlists
I know how to use the checkboxlist in ASP.NET to display options retrieved from a database. What I ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 21, 2022
in
Education
by
JackTerrance
asp
net
0
votes
Q: How do I validate that a list box is not empty (client side)
I'm working with ASP.NET 3.5. I have a list box that users must add items to (I've written ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 12, 2022
in
Education
by
JackTerrance
asp
netvalidationlistbox
0
votes
Q: Unable to get the Role using Context.User.IsRole
I write the following code to access the page but this is not working for me if (User.Identity. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 2, 2022
in
Education
by
JackTerrance
asp
netc#-3
0
0
votes
Q: Unable to get the Role using Context.User.IsRole
I write the following code to access the page but this is not working for me if (User.Identity. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 2, 2022
in
Education
by
JackTerrance
asp
netc#-3
0
0
votes
Q: Does Azure Service Fabric do the same thing as Docker?
My thinking is that people use Docker to be sure that local environment is the same as production and that ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Jun 12, 2022
in
Education
by
JackTerrance
asp
netazuredocker
0
votes
Q: How do you tell IIS 6 to set the .NET version to 2.0 (not 1.1) When New sites are created?
We create new sites in IIS 6 (Windows Server 2003) using IIS Manager. When these sites are created ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 27, 2022
in
Education
by
JackTerrance
asp
netiis-6
0
votes
Q: Controls do not appear on dynamically created user control
I have user control named DateTimeUC which has two textboxes on its markup: I am dynamically creating this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 13, 2022
in
Education
by
JackTerrance
asp
netuser-controls
0
votes
Q: Controls do not appear on dynamically created user control
I have user control named DateTimeUC which has two textboxes on its markup: I am dynamically creating this ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked
Mar 13, 2022
in
Education
by
JackTerrance
asp
netuser-controls
...