Sounds in my ears like you should refactor your application, and extract the functionality that generates the string out to a new seperate class (or reuse an existing class, if you have one that fits) and let both controllers use that class.
More Related Contents:
- Html.Partial vs Html.RenderPartial & Html.Action vs Html.RenderAction
- Fake DbContext of Entity Framework 4.1 to Test
- Override Authorize Attribute in ASP.NET MVC
- How can I get my webapp’s base URL in ASP.NET MVC?
- New asp.net charting controls – will they work with MVC (eventually)?
- “The resource cannot be found.” error when there is a “dot” at the end of the url
- ASP.NET MVC – Getting QueryString values
- MVC4 HTTP Error 403.14 – Forbidden
- Windows update caused MVC3 and MVC4 stop working
- Parser Error Message: Could not load type ‘TestMvcApplication.MvcApplication’
- How to change default view location scheme in ASP.NET MVC?
- Create virtual directory on same azure web app
- Cannot attach the file *.mdf as database
- How to create a CheckBoxListFor extension method in ASP.NET MVC?
- Retrieve the current view name in ASP.NET MVC?
- Using scripts in a master page with ASP.NET MVC
- Where and how is the _ViewStart.cshtml layout file linked?
- Connection string using Windows Authentication
- Can’t find ADO.net Entity Data Model template in VS2017
- What does Html.HiddenFor do?
- Where to run a duplicate check for an entity
- What’s the difference between RouteLink and ActionLink in ASP.NET MVC?
- ASP .NET MVC Forms authorization with Active Directory groups
- How to send an email with attachments using SmtpClient.SendAsync?
- How to throw a SqlException when needed for mocking and unit testing?
- The model backing the ‘ApplicationDbContext’ context has changed since the database was created
- How do I solve an AntiForgeryToken exception that occurs after an iisreset in my ASP.Net MVC app?
- How to Convert Row to Column in Linq and SQL
- Integrate existing ASP.NET MVC application with Orchard CMS
- How can I force a hard refresh (ctrl+F5)?