Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

asp.net mvc - Url.Action is throwing error CS1026: ) expected -


this syntax error i'm new mvc , trying edit exists without having experience. having spent ages trying different syntax i'm missing something.

my issue have this:

var url = '<%= url.action("list") %>?page=' + pageno; 

which fine, not passing in required parameters part of pager functionality.

what want use like:

var url = '<%= html.renderaction("list",                 "placementagreementagencyplacementagreementsplacement",                 new { domain = "placement",                       id = model.item.placementagreement.placementagreementid,                       agencyplacementagreementid = model.item.agencyplacementagreementid,                       page = model.pageno                  });             %>'; 

but complains error cs1026: ) expected

same trying

<%= url.action("list", "placementagreementagencyplacementagreementsplacement",          new { domain = "placement",                id = viewdata.model.agencyplacementagreement.placementagreement.placementagreementid,                agencyplacementagreementid = viewdata.model.agencyplacementagreement.agencyplacementagreementid,                page = model.pageno }     )%> 

if point out i'm doing wrong great. i'm trying call controller placementagreementagencyplacementagreementsplacement action list passing in parameters id, agencyplacementagreementid , page. it's being done in javascript can use this:

    function loadagreementplacementpage(pageno) {          var url = '<%= url.action("list") %>?page=' + pageno;         $.get(url, function(data) {             $("#agreementplacement_list_holder").html(data);         }); 

thanks!!!

ps. using mvc 1.0.

it should be:

var url = '<%= url.action(                "list",                 "placementagreementagencyplacementagreementsplacement",                 new {                     domain = "placement",                     id = model.item.placementagreement.placementagreementid,                     agencyplacementagreementid = model.item.agencyplacementagreementid,                     page = model.pageno                 }) %>'; 

use url.action instead of html.renderaction , remove semicolon @ end.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -