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

Writing tasks using dotnet cli
How do I register and use a MediatR pipeline handler, for ASP.NET Core?
Is there any website which provide implementation details of ASP.NET Core source code?
AspNetCore giving 404 when trying to use Action Parameter
~solved~ .net core webapi post action always has invalid modelstate
UWP and mvc core 1
Disable Not Authorized Redirect to Account/Login in ASP.NET Core
Dependency conflict in project.json
Do we need interfaces for DI?
Get AD info for user in Windows Authentication for ASP .NET Core
Securing Azure hosted Asp.Net Core Web Api
How to create/use view inEntityFrameworkCore with inMemoryDatabase
OpenIddict: 401 errors when two or more service instance count
No executable found matching command “dotnet-watch”
Get nesting level of view in ASP.NET Core
Reference local build of Microsoft.AspNetCore.Mvc in AspNetCore application

Categories

HOME
image
jdo
openmp
isabelle
read-eval-print-loop
cvs
yarn
twitter-bootstrap-4
in-app-purchase
autotools
gitpitch
cloudkit
quickbooks
qt-creator
iron-router
immutable.js
intentfilter
orleans
facebook-instant-articles
telerik-reporting
restful-authentication
trading
kannel
internet-explorer-9
social-media
saas
facebook-apps
large-file-upload
c++-amp
delicious-api
unboundid
flink-streaming
socialengine
directx-10
galsim
scorm2004
framemaker
avcapturesession
android-kernel
mpmediaquery
adobe-premiere
neuroscience
service-discovery
twitch
pdf-reactor
gulp-sourcemaps
import-from-excel
netcdf4
flashair
slick-3.0
filepicker
fancybox-2
git-diff
redundancy
eventkit
gridpane
probability-density
transmitfile
impresspages
python-stackless
apachebench
hsv
spim
icu4j
browser-bugs
muse
generic-programming
ami
npapi
fscommand
dia
javafx-webengine
internet-connection
php-5.4
terminfo
mesa
contenttype
picturefill
android-2.2-froyo
transcoding
oracle-warehouse-builder
jsctypes
eclipse-memory-analyzer
django-nonrel
mqx
android-hardware
distutils
referrer
quickdialog
reddot
work-stealing
custom-backend
whoosh
php-parser
gnustep
pydot
blackberry-playbook
hamachi
yetanotherforum
sql-server-profiler
sudzc
asp.net-mvc-areas
sproutcore-2
webkit.net
zend-decorators
commodore

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