Click here to Skip to main content
15,885,244 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Regarding input controls to use on Forums Pin
Richard Deeming29-Aug-13 2:30
mveRichard Deeming29-Aug-13 2:30 
AnswerRe: Regarding input controls to use on Forums Pin
Forbiddenx30-Aug-13 3:49
Forbiddenx30-Aug-13 3:49 
Questionset inputfield value using java in ASP.net Pin
happysoul28-Aug-13 21:45
happysoul28-Aug-13 21:45 
SuggestionRe: set inputfield value using java in ASP.net Pin
Richard Deeming29-Aug-13 2:27
mveRichard Deeming29-Aug-13 2:27 
GeneralRe: set inputfield value using java in ASP.net Pin
happysoul29-Aug-13 2:51
happysoul29-Aug-13 2:51 
GeneralRe: set inputfield value using java in ASP.net Pin
Richard Deeming29-Aug-13 2:56
mveRichard Deeming29-Aug-13 2:56 
GeneralRe: set inputfield value using java in ASP.net Pin
happysoul29-Aug-13 3:34
happysoul29-Aug-13 3:34 
QuestionAjax Form URL from List<ViewModel> Pin
eddieangel28-Aug-13 7:16
eddieangel28-Aug-13 7:16 
My page has a model type of List<viewmodel>. I am looping through that list and generating a form for each item. The items are all available reports, some of which accept parameters, some don't. As such, I decided to build a form for each one and handle the parameter processing on the controller end.

Here is what the code looks like, sorta:

HTML
@foreach(ViewModels.ReportViewModel item in Model) {
            <li @{if (i == 0) {<text>class="k-state-active"</text>}}>
                <span @{if (i == 0) {<text>class="k-link k-state-selected"</text>}}>@item.name</span>
                <div>
                    @using (Ajax.BeginForm("Queue","Reporting",options))
                    {
                        @Html.HiddenFor(t => item.id)
                        @Html.Hidden("id",item.id)
                        foreach(var parameter in item.parameters) {
                            <div style="padding: 5px">
                                @Html.Label(parameter.displayName)
                            </div>
                            <div style="padding:0px 0px 5px 5px">
                                @Html.EditorFor(p => parameter.name, "ECR")
                            </div>
                        }
                        <div style="padding-bottom:5px;width:300px">
                            <input type="submit" class="k-button k-button-icontext k-grid-select" style = "margin-left:255px;width:50px" id="submit" name="submit" value="Submit" />
                        </div>
                    }
                </div>
            </li>
        i++;
        }


And the controller code looks like this:

C#
[AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Queue(ReportViewModel vm)
        {
            ReportQueue item = new ReportQueue
            {
                reportId = vm.id,
                userId = 2,
                statusId = 0,
                reportParams = null,
                datestamp = DateTime.Now
            };
            _uw.ReportQueueRepository.Insert(item);
            _uw.Save();

            return RedirectToAction("Index", new { id = vm.claimId });
        }


The rendered form markup looks ok (action: /Reporting/Queue) but it is not hitting the action on the controller but is actually making a mess. Firebug shows it trying to process an Ajax request for data (Which is expected as the parameter.name triggers an editor template) but it is appending /Queue onto the Ajax request.

What gives? Is this a method signature mismatch issue?

Cheers, --EA
QuestionDesign Ideas - List Of Custom controls. Pin
Forbiddenx28-Aug-13 5:57
Forbiddenx28-Aug-13 5:57 
GeneralRe: Design Ideas - List Of Custom controls. Pin
AmitGajjar2-Sep-13 21:05
professionalAmitGajjar2-Sep-13 21:05 
Questionbasic questions about viewstate Pin
ThetaClear26-Aug-13 22:16
ThetaClear26-Aug-13 22:16 
AnswerRe: basic questions about viewstate Pin
Keith Barrow28-Aug-13 6:21
professionalKeith Barrow28-Aug-13 6:21 
GeneralRe: basic questions about viewstate Pin
ThetaClear28-Aug-13 7:02
ThetaClear28-Aug-13 7:02 
QuestionHow to insert Header Rows into Gridview with custom method? Pin
arcadeRob26-Aug-13 6:57
arcadeRob26-Aug-13 6:57 
QuestionMenu Navigation Pin
Codes DeCodes26-Aug-13 0:37
Codes DeCodes26-Aug-13 0:37 
AnswerRe: Menu Navigation Pin
Paramu197326-Aug-13 4:10
Paramu197326-Aug-13 4:10 
GeneralRe: Menu Navigation Pin
Codes DeCodes26-Aug-13 18:48
Codes DeCodes26-Aug-13 18:48 
AnswerRe: Menu Navigation Pin
Priyanka Bhagwat28-Aug-13 21:33
professionalPriyanka Bhagwat28-Aug-13 21:33 
GeneralRe: Menu Navigation Pin
Codes DeCodes30-Aug-13 0:45
Codes DeCodes30-Aug-13 0:45 
QuestionUpdatePanel Image -Update Pin
Paramu197325-Aug-13 21:53
Paramu197325-Aug-13 21:53 
AnswerRe: UpdatePanel Image -Update Pin
jkirkerx26-Aug-13 6:52
professionaljkirkerx26-Aug-13 6:52 
QuestionDotnetnuke bootstrap Pin
sarang_k25-Aug-13 2:18
sarang_k25-Aug-13 2:18 
Questionhow to run java command on web server Pin
ianoseb24-Aug-13 23:12
ianoseb24-Aug-13 23:12 
AnswerRe: how to run java command on web server Pin
Bernhard Hiller25-Aug-13 21:24
Bernhard Hiller25-Aug-13 21:24 
QuestionViewing password Pin
larsp77723-Aug-13 3:52
larsp77723-Aug-13 3:52 

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.