asp action to another controller

相關問題 & 資訊整理

asp action to another controller

Controllers are just classes - new one up and call the action method just like you would any other class member: var result = new ControllerB()., You can supply the area in the routeValues parameter. Try this: return RedirectToAction("LogIn", "Account", new area = "Admin" });. Or, Use the overloads that take the controller name too... return RedirectToAction("Index", "MyController");. and @Html.ActionLink("Link Name" ...,Try this: if (button == "Save as Pdf") return RedirectToAction("getPdf", "Pdf", resultObtained); }. , Why are you calling a controller from a controller? A controller action should be called via a route and return a view. If you have common code ...,If you're first action is complete then you might redirect to another action. If there is some common code between these two controllers that you don't want to ... ,First of all remember to configure attribute routing: public static void RegisterRoutes(RouteCollection routes) routes.IgnoreRoute("resource}.axd/*pathInfo}"); ... , The issue that you are having is that you have created a duplicate signature on Second action set (ForgotPasswordCode in my example)., Adding Route Parameters. <a asp-controller="Product" asp-action="Display" asp-route-id="@ViewBag.ProductId">,hi, i want to call a controller action from another controller, and i don't want use Redirect 30x thank you.

相關軟體 eM Client 資訊

eM Client
如果你正在尋找容易使用,但功能豐富的電子郵件客戶端看起來沒有進一步。 eM Client 是你需要的! eM Client 是一個功能齊全的電子郵件客戶端,因為它也支持日曆,任務,聯繫人甚至聊天。您可以通過 POP 或 IMAP 協議將 eM Client 連接到您的電子郵件帳戶, Gmail,Yahoo,Outlook,Hotmail,iCloud 帳戶,並且還支持 MS Exchange 和 ... eM Client 軟體介紹

asp action to another controller 相關參考資料
How to call another controller Action From a controller in Mvc ...

Controllers are just classes - new one up and call the action method just like you would any other class member: var result = new ControllerB().

https://stackoverflow.com

Redirect to Action in another controller - Stack Overflow

You can supply the area in the routeValues parameter. Try this: return RedirectToAction(&quot;LogIn&quot;, &quot;Account&quot;, new area = &quot;Admin&quot; });. Or

https://stackoverflow.com

How to redirect to Index from another controller? - Stack Overflow

Use the overloads that take the controller name too... return RedirectToAction(&quot;Index&quot;, &quot;MyController&quot;);. and @Html.ActionLink(&quot;Link Name&quot;&nbsp;...

https://stackoverflow.com

RedirectToAction to action in another controller not working ...

Try this: if (button == &quot;Save as Pdf&quot;) return RedirectToAction(&quot;getPdf&quot;, &quot;Pdf&quot;, resultObtained); }.

https://stackoverflow.com

Call an action from another controller - Stack Overflow

Why are you calling a controller from a controller? A controller action should be called via a route and return a view. If you have common code&nbsp;...

https://stackoverflow.com

Call action from another Controller - Stack Overflow

If you&#39;re first action is complete then you might redirect to another action. If there is some common code between these two controllers that you don&#39;t want to&nbsp;...

https://stackoverflow.com

Simple Route to an action in another controller - Stack Overflow

First of all remember to configure attribute routing: public static void RegisterRoutes(RouteCollection routes) routes.IgnoreRoute(&quot;resource}.axd/*pathInfo}&quot;);&nbsp;...

https://stackoverflow.com

pass data from one controller action to another controller action ...

The issue that you are having is that you have created a duplicate signature on Second action set (ForgotPasswordCode in my example).

https://stackoverflow.com

ASP.NET Core MVC Anchor Tag Helper | Dave Paquette

Adding Route Parameters. &lt;a asp-controller=&quot;Product&quot; asp-action=&quot;Display&quot; asp-route-id=&quot;@ViewBag.ProductId&quot;&gt;

https://www.davepaquette.com

how to call a controller action from another controller | The ASP ...

hi, i want to call a controller action from another controller, and i don&#39;t want use Redirect 30x thank you.

https://forums.asp.net