Click here to Skip to main content
16,016,301 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionVisual Studio 2015 web service : change port Pin
Pierrick Orban28-Jan-16 12:41
Pierrick Orban28-Jan-16 12:41 
AnswerRe: Visual Studio 2015 web service : change port Pin
Nathan Minier29-Jan-16 2:16
professionalNathan Minier29-Jan-16 2:16 
GeneralRe: Visual Studio 2015 web service : change port Pin
Pierrick Orban31-Jan-16 23:00
Pierrick Orban31-Jan-16 23:00 
GeneralRe: Visual Studio 2015 web service : change port Pin
Nathan Minier1-Feb-16 1:29
professionalNathan Minier1-Feb-16 1:29 
GeneralRe: Visual Studio 2015 web service : change port Pin
Pierrick Orban1-Feb-16 3:01
Pierrick Orban1-Feb-16 3:01 
GeneralRe: Visual Studio 2015 web service : change port Pin
Nathan Minier1-Feb-16 3:06
professionalNathan Minier1-Feb-16 3:06 
GeneralRe: Visual Studio 2015 web service : change port Pin
Pierrick Orban1-Feb-16 3:38
Pierrick Orban1-Feb-16 3:38 
QuestionMVC Razor View and JQuery, how to use @Url.Action Pin
jkirkerx28-Jan-16 10:13
professionaljkirkerx28-Jan-16 10:13 
I don't get it. I have this JQuery Script that loads states when the country changes. So I did a bind to the Country Select List.

It calls a $.ajax request to get the Json list of states.

In the view, I added this
@Url.Action("Action", "Controller");
So it works if I just use a straight address,
var url = "/Customer/load_StateCodes/";
But I don't understand how to use @Url.Action with the controller. This is my first time doing this in MVC.
Is this the preferred method?

On a side note, I really didn't want to bind the select list, and I was trying to add child script to the select list, like in Web Forms, but could not find anything on the web. Is this just not possible?
// bindable version of Country Code for address forms
$("#CountryCode").change(function () {

    var procemessage = "<option value='0'> Please wait...</option>";
    $("#StateCode").html(procemessage).show();       

    $.ajax({
        type: "POST",
        url: '@Url.Action("load_StateCodes", "Customer")',
        data: { stateId: $("#CountryCode > option:selected").attr("value") },
        cache: true,
        type: "POST",
        dataType: "json",
        error: function (data) {
            alert(data);
        },
        success: function (data) {
            var items = [];
            items.push("<option>--Choose Your State--</option>");
            $.each(data, function () {
                items.push("<option value=" + this.Value + ">" + this.Text + "</option>");
            });
            $("#StateCode").html(items.join(' '));
        }
    })
});

AnswerRe: MVC Razor View and JQuery, how to use @Url.Action Pin
F-ES Sitecore28-Jan-16 21:55
professionalF-ES Sitecore28-Jan-16 21:55 
GeneralRe: MVC Razor View and JQuery, how to use @Url.Action Pin
jkirkerx29-Jan-16 3:42
professionaljkirkerx29-Jan-16 3:42 
GeneralRe: MVC Razor View and JQuery, how to use @Url.Action Pin
F-ES Sitecore29-Jan-16 3:57
professionalF-ES Sitecore29-Jan-16 3:57 
GeneralRe: MVC Razor View and JQuery, how to use @Url.Action Pin
jkirkerx29-Jan-16 4:14
professionaljkirkerx29-Jan-16 4:14 
Questionautomatic textbox date display Pin
Member 1228733728-Jan-16 8:18
Member 1228733728-Jan-16 8:18 
AnswerRe: automatic textbox date display Pin
F-ES Sitecore28-Jan-16 21:53
professionalF-ES Sitecore28-Jan-16 21:53 
QuestionSqlconnection Pin
Member 1228733728-Jan-16 4:08
Member 1228733728-Jan-16 4:08 
AnswerRe: Sqlconnection Pin
Richard Deeming28-Jan-16 4:26
mveRichard Deeming28-Jan-16 4:26 
GeneralRe: Sqlconnection Pin
Member 1228733728-Jan-16 5:48
Member 1228733728-Jan-16 5:48 
GeneralRe: Sqlconnection Pin
Richard Deeming28-Jan-16 6:10
mveRichard Deeming28-Jan-16 6:10 
GeneralRe: Sqlconnection Pin
Member 1228733728-Jan-16 6:46
Member 1228733728-Jan-16 6:46 
GeneralRe: Sqlconnection Pin
Richard Deeming28-Jan-16 6:50
mveRichard Deeming28-Jan-16 6:50 
GeneralRe: Sqlconnection Pin
Member 1228733728-Jan-16 7:30
Member 1228733728-Jan-16 7:30 
Questionhow to generate dll from a project Pin
Member 1219595528-Jan-16 0:54
Member 1219595528-Jan-16 0:54 
AnswerRe: how to generate dll from a project Pin
Richard MacCutchan28-Jan-16 1:17
mveRichard MacCutchan28-Jan-16 1:17 
AnswerRe: how to generate dll from a project Pin
ZurdoDev28-Jan-16 4:35
professionalZurdoDev28-Jan-16 4:35 
QuestionHTTPWebRequest sending right in POST method but manually inserting null Pin
Sachin k Rajput 27-Jan-16 22:46
Sachin k Rajput 27-Jan-16 22:46 

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.