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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 251k
  • Answers 252k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Known bug in MVC 2 RC, will be fixed for… May 13, 2026 at 9:36 am
  • Editorial Team
    Editorial Team added an answer Set up a transparent proxy. May 13, 2026 at 9:36 am
  • Editorial Team
    Editorial Team added an answer Prism is a replacement for Delphi .Net - it has… May 13, 2026 at 9:36 am

Related Questions

I've been a PHP developer for many years now, with many tools under my
I am not sure what I am doing wrong. I am trying to use
I have an asp.net MVC app that i am working on and I wrote
I have an asp.net MVC App that I want to deploy to IIS 5

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.