Click here to Skip to main content
15,895,799 members
Home / Discussions / Web Development
   

Web Development

 
JokeRe: MVC5 checkbox size Pin
Richard Deeming3-Nov-17 10:03
mveRichard Deeming3-Nov-17 10:03 
GeneralRe: MVC5 checkbox size Pin
#realJSOP7-Nov-17 4:15
mve#realJSOP7-Nov-17 4:15 
Questionusing javascript in a Firefox browser Pin
classy_dog30-Oct-17 10:49
classy_dog30-Oct-17 10:49 
AnswerRe: using javascript in a Firefox browser Pin
Afzaal Ahmad Zeeshan30-Oct-17 11:14
professionalAfzaal Ahmad Zeeshan30-Oct-17 11:14 
AnswerRe: using javascript in a Firefox browser Pin
Nathan Minier31-Oct-17 1:23
professionalNathan Minier31-Oct-17 1:23 
QuestionCreate a web page to connect to unix server Pin
LuckySas30-Oct-17 4:19
LuckySas30-Oct-17 4:19 
AnswerRe: Create a web page to connect to unix server Pin
Richard MacCutchan30-Oct-17 5:36
mveRichard MacCutchan30-Oct-17 5:36 
QuestionMVC5 posting data to controller Pin
#realJSOP28-Oct-17 6:12
mve#realJSOP28-Oct-17 6:12 
I'm trying to post some data from the view for processing in the controller, but I'm not having any luck.

In my controller, I have this method:

[HttpPost]
public ActionResult Create(string street, string city, string state, string zip)
{
    Geocoder geoCoder = new Geocoder(street, city, state, zip);
    ViewBag.GeoCodeMsg = string.Concat("Address confidence is ", geoCoder.Address.Location.Confidence);
    return View();
}


In my view, I have this:

HTML
<input type="submit" name="validateAddr" value="Verify Address" class="btn btn-default" 
onclick="location.href='@Url.Action("ValidateAddress","ICSProfile",new { street=Model.Street, 
city=Model.City, state=Model.StateProvince, zip=Model.Zipcode })'" /></li>


When I click the "Validate Address" button, it gives me a 404 error for ICSProfile/ValidateAddress.

My desire is to post the info back to the controller, work on the data, and then update the view based on the processing results. What am I missing?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

AnswerRe: MVC5 posting data to controller Pin
Nathan Minier30-Oct-17 1:23
professionalNathan Minier30-Oct-17 1:23 
Questionpassing id using@url.Action Pin
svknair26-Oct-17 23:59
svknair26-Oct-17 23:59 
AnswerRe: passing id using@url.Action Pin
Nathan Minier27-Oct-17 1:33
professionalNathan Minier27-Oct-17 1:33 
QuestionEF6 and MVC - Models *and* ViewModels? Pin
#realJSOP24-Oct-17 4:58
mve#realJSOP24-Oct-17 4:58 
PraiseRe: EF6 and MVC - Models *and* ViewModels? Pin
Richard Deeming24-Oct-17 5:30
mveRichard Deeming24-Oct-17 5:30 
GeneralRe: EF6 and MVC - Models *and* ViewModels? Pin
#realJSOP24-Oct-17 6:36
mve#realJSOP24-Oct-17 6:36 
GeneralRe: EF6 and MVC - Models *and* ViewModels? Pin
Richard Deeming24-Oct-17 6:40
mveRichard Deeming24-Oct-17 6:40 
AnswerRe: EF6 and MVC - Models *and* ViewModels? Pin
Nathan Minier25-Oct-17 1:47
professionalNathan Minier25-Oct-17 1:47 
Questionpassword hasher Pin
Member 1347817421-Oct-17 20:38
Member 1347817421-Oct-17 20:38 
QuestionRe: password hasher Pin
Richard MacCutchan23-Oct-17 2:48
mveRichard MacCutchan23-Oct-17 2:48 
QuestionWhat do y'all use for prototyping Pin
#realJSOP19-Oct-17 5:52
mve#realJSOP19-Oct-17 5:52 
QuestionIt's probably just me... Pin
#realJSOP18-Oct-17 2:39
mve#realJSOP18-Oct-17 2:39 
AnswerRe: It's probably just me... Pin
Nathan Minier23-Oct-17 1:25
professionalNathan Minier23-Oct-17 1:25 
GeneralRe: It's probably just me... Pin
#realJSOP23-Oct-17 4:45
mve#realJSOP23-Oct-17 4:45 
GeneralRe: It's probably just me... Pin
Nathan Minier23-Oct-17 6:13
professionalNathan Minier23-Oct-17 6:13 
QuestionRelated to Table in angular 4 material Pin
Munjal Pandya6-Oct-17 22:18
Munjal Pandya6-Oct-17 22:18 
SuggestionRe: Related to Table in angular 4 material Pin
Richard Deeming9-Oct-17 8:55
mveRichard Deeming9-Oct-17 8:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.