asp.net-core


(Resolved) #Url.Action in ASP.NET Core does not exist


I can't use #Url.Action in ASP.NET Core because I have error:
IUrlHelper has no applicable method named Action
I want to use #Url.Action for:
page i
In ASP.NET MVC it generated me urls for example:
/Home/List?page=5&search=abc
In ViewBag.routeValues I pass additional parameters, for example: search=abc&active=true and paste it to url after 'page' parameter.
I think I can't do the same using tag helper and 'asp-route' - so what can I do?
-----------------------------------------------------
Ok - I need to cas ViewBag to string:
page i
You should first read the ASP.NET Core Documentation to find out what tag helpers are and how to use them.
In ASP.NET Core's Razor implementation, tag helpers are used instead of helper methods.
page i
would translate into
<a asp-controller="#ViewBag.actionName" asp-action="#ViewBag.controllerName" asp-route-id = "#i">page i</a>
"asp-route" can be either a route parameter or a query parameter (if the given action has no such route parameter). so asp-route-xyz="abc" would add ?xyz=abc to the url.

Related Links

What is an analog of WebActivator in ASP.NET 5
How to enable SSL for IIS Express in VS2015
ASP.NET vNext with EntityFramework.Core
Dependencies from git
How to use soap web services in Asp.net Core?
How to run stored procedures in Entity Framework Core?
Replacement for HttpHandlers in ASP.NET vNext
Bower dependencies folder won't expand after VS crash
Common wwwroot folder for multiple websites in MVC 6
How to Use HTTPS with Microsoft.AspNet.Server.WebListener
Where does VS 2015 pick up the KRE versions?
Debug Setting in .Net 5
Inject DI service into ASP.NET 5 Tag Helper
Which package do I need for Images in asp.net 5?
How do I configure an Entity Framework interceptor in an aspnet vnext config.json file?
How to inject DbContext in MVC 6 using default dependency injection?

Categories

HOME
xamarin
log4j
hive
listview
drivers
view
webstorm
dxl
icloud
swagger-ui
contact
iggrid
mapserver
collectd
alignment
msp430
uitypeeditor
django-admin
pugjs
text-rendering
jasonette
facebook-instant-articles
excel-2007
javacv
procdump
librato
sql-server-2012-express
http-status-code-503
appfabric
jquery-bootgrid
abstract-class
sas-visual-analytics
mapzen
grid.mvc
texmaker
scorm
parentheses
react-scripts
jquery-nestable
typescript1.8
integrity
gabor-filter
elgg
jspdf-autotable
spring-mongodb
angular-strap
abcpdf9
spring-android
prettytensor
packagist
pickadate
ios8-today-widget
spim
marching-cubes
collapse
jmeter-maven-plugin
feedback
coveralls
tarjans-algorithm
arcanist
notify
e10s
truevault
bigbluebutton
kineticjs
codeigniter-url
coldbox
tt-news
cdt
uitouch
fluentautomation
balanced-payments
monomac
dir
dataservice
hungarian-algorithm
ember-app-kit
typoscript2
simba
hamiltonian-cycle
unc
bitsharp
isnullorempty
broken-links
regsvr32
work-stealing
gnu-prolog
gnustep
xdomainrequest
celltable
html-input
digest-authentication
sortable-tables
sproutcore-2
asp.net-profiles
vc90
kdbg
libs
phonon
sustainable-pace

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App