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 6613437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:13:07+00:00 2026-05-25T20:13:07+00:00

I have had a php site for about 10 years now, and tweaked and

  • 0

I have had a php site for about 10 years now, and tweaked and tuned it over these years to finally knock it down to a page of common functions, and about 10 content pages.

However, I want to learn .NET. I have touched on .NET at work in the past, but have never dealt with anything as… specific?… as my site there.

…OK, I am babbling, sorry. Bottom line is:
Can/should I be using a function in asp.net where in php I would have a function:

<? DrawMapTable("id", "MapName", "Description.", "Filename", "Players", "MapSize", "Game") ?>

Which would draw a table, such as:

<h3> <a> $mapNameFull </a> </h3><img class='mapImage' src='images/$mapName.png' alt='$mapNameFull' /><p>$mapDescription</p><p><a href='maps/$fileMapName'>Download map: $mapNameFull</a></p>
<table class='mapTable'><tr><th class='mapTableCellBig'> Map Name </th><th class='mapTableCell'> Players </th><th class='mapTableCell'> Dimensions </th><th class='mapTableCell'> Version </th></tr><tr>
<td class='mapTableCellBig'> <a href='maps/$fileMapName'>$fileMapName</a> </td><td class='mapTableCell'> $mapPlayers </td><td class='mapTableCell'> $mapDims </td><td class='mapTableCell'> $mapVersion </td></tr></table>

And if so, how?

ATTEMPT AT A BETTER EXPLANATION:

For example, if I have this in my master codebehind page:

public String SectionBreak()
{
  string sHtml = "";
  sHtml += "  </td></tr>\n";
  sHtml += "  <tr><td class='mainCell'>\n";

  return sHtml;
}
  1. How would I call it in, say, default.aspx
  2. Is this a horrible thing to do?

Basically, I am trying to get away from using html in my content pages by obscuring it within functions that explain what the html is doing.

But the only way I can think to do this at the moment is to create a load of labels and have an onLoad for each of those labels, which would populate it with the code from, for example, SectionBreak().

  • 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. Editorial Team
    Editorial Team
    2026-05-25T20:13:07+00:00Added an answer on May 25, 2026 at 8:13 pm

    In classic ASP.NET you have server side controls which generate HTML fragments. For example when dealing with tables, you could use the GridView control.

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

Sidebar

Related Questions

I have had an online archive service for over a year now. Unfortunately, I
I have a site that has a big form page and about half of
I have migrated a old php/mysql site to ruby on rails, and had to
I have recently had a linux server compromised from bots uploading .php scripts and
Using PHP / MySQL all encoded up as UTF, we have recently had to
I have a html text. I had encoded it in php using urlencode function.
I have had a look all over, but it doesn't seem as though my
I've been developing websites for a few years now, and I've never had the
About 4 years ago I used a php product called amember pro, it is
I have a very basic two-page website: the home page, and an about page.

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.