Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 185987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:34:05+00:00 2026-05-11T15:34:05+00:00

I have a Mvc app that I am replacing some hard rendered tables with

  • 0

I have a Mvc app that I am replacing some hard rendered tables with jqGrid [XML].

Problem is I have action links in one of my columns to perform certain actions on the rows. I have these duplicated using CDATA tags in my XML; however the problem is that now this tag is generated in an action method so all the HTML is in my controller (in a TagBuilder) and this is decidedly NOT good.

I was going to look into the RenderPartialExtensions but you need an HtmlHelper instance for that, plus I am using the brail view engine so I am not even sure that would work.

How have other people handled this?
I guess I could create a view that renders the actual xml like html but then I would need to create a view for each xml data source and I already have those.

Thank you in advance for your input.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:34:05+00:00Added an answer on May 11, 2026 at 3:34 pm

    To clarify more of the architecture and how I ended up solving it. I have the following projects / assemblies:

    1. Business Objects
    2. VB XML De/Serialization library
    3. ASP.NET MVC Project

    The VB XML assembly handles serializing the business objects dealing with only the business (#1) model. So i would output an XElement something like this:

    <invoice>    <invoiceId>1234</invoiceId>    <customer>Hudsucker Industries</customer>    <otherBusinessData>etc, etc</otherBusinessData> </invoice> 

    The problem arises that I am using jqGrid and I need to add elements to each invoice to certain actions so I need something like:

    <invoice>    <actionHtml><![CDATA[   ...some HTML such as links... ]]></actionHtml>    <invoiceId>1234</invoiceId>    <customer>Hudsucker Industries</customer>    <otherBusinessData>etc, etc</otherBusinessData> </invoice> 

    I got it to work but I had to generate all the actionHtml in the controller which is obviously not a good separation of concerns and I lost all my HtmlHelper methods and such. So how I ended up solving it the ‘correct’ way is:

    1. Using a WebForms view (I use brail views for my pages) [so I can use the ContentType page attribute to set it to XML].
    2. Pass the collection of my raw business objects as the model data.
    3. Loop the model collection, building the actonHtml element for each invoice in the view (hence getting my HtmlHelper methods and such)
    4. To output the actual business elements I can simply invoke my VB XML library and do a: invoice.ToXml().Elements().ToString() and I am good.

    To further make this more reusable I created a jqGrid master page that has all the record counts and such in content areas so I can just pass that information in on the actual pages and just worry about outputting the element data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an action filter in an ASP.NET MVC 3 app that needs some
I have C# MVC web app that has some textboxes that in IE9 you
I have configured in following way that spring MVC app using Spring 3.1.1.RELEASE web.xml
I have an MVC app that is basically one page with a bunch of
I have a mvc 3 app that uses EF. In one function I need
I have an asp.net MVC app that also has a silverlight project for some
I have a MVC-app that has a controller with an action that is supposed
I have an MVC 3 web app that has an Action which I need
I have an MVC app that does a lot of work with jQuery ajax
So, I have an asp.net mvc app that is being worked on by multiple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.