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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:06:13+00:00 2026-06-17T01:06:13+00:00

Situation: I have been creating webpages in HTML5/CSS3 & Javascript using Sublime 2 text

  • 0

Situation: I have been creating webpages in HTML5/CSS3 & Javascript using Sublime 2 text editor for a year, however a college course now requires me to use Asp.Net and Visual Studio 2010. I do not use the designer because I am proficient at doing things by hand, however I find that writing asp: inside every element is time consuming and causes syntax errors when applied to some HTML 5 tags and not others.

Example HTML 5: <button id="btn" type="submit" value="Button"/>

Example Asp.net: <asp:Button ID="Button1" runat="server" Text="Button" />

Question: Can the asp: portion be omitted without effecting anything or is it required for IIS or the C# back-end functionality? What about runat=”server” can that be omitted?
Google has come up dry regarding my inquiry, so any help is appreciated.

  • 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-06-17T01:06:14+00:00Added an answer on June 17, 2026 at 1:06 am

    you simply cannot remove either of the two
    but hear me out why, because I have a feeling you are not familiar with ASP and therefor are mistaking the meaning of the asp: and the runat="server" syntax.

    first: runat="server"
    this property on an element, tells the the compiler that this is actually a server side control
    so a <button/> is not the same as an <button runat="server"/>
    the first one is pure html, while the second one is a control, which can be bound to on the server side. .Net will give it a clientID (not to be mistaken by the ID you have to give it yourself).

    second: asp:
    this is a prefix, on certain elements, that tells the compiler these are ASP controls (the default controls given by the ASP.net framework). These include Buttons, TextBoxes, DropDownLists, …
    do not mistake 1 of these with a html element.

    an <asp:Button id="myAspButton" runat="server"/>
    is not the same as a <button id="myHtmlButton"/>

    the first, is a server side control, which can be bound to (see it’s runat="server" attribute), and this control renders to the browser as a <input type="submit"/> for example.

    you could alter the rendering of the asp.net button class to make it return something entirely differnt if you wish.

    and you are also not limited to using asp.net classes.
    you can create your own controls, and put them in a custom created library
    you could give those your own prefix.

    if I created such a custom control, I could register a prefix for it in the web.config file,
    and thus I could create a custom button extending from the original one (but with a default label in front…

    <myc:CustomButton ID="myButton" Text="myButton" Label="myLabel" runat="server"/>
    

    which could render into:

    <label>myLabel</label>
    <button ID="*******">myButton</button>
    

    the asterisks are symbolizing the Unique ID it will get from the .net framework

    if you want to know more on custom controls, or extending default controls
    here is a step by step explanation to create custom controls, or extend from a TextBox control.
    it also shows how you add a custom prefix for your controls (in the this case ‘cc’)
    you can find more info here

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

Sidebar

Related Questions

Situation I have been working on a project lately where the UI development seems
I tried endlessly now you resolve this utter frustrating situation I have been having.
I have been googling for hours looking for something to handle my situation. I
Here's the situation: On a particular branch, some changes have been merged in from
I haven't been able to find anything for a situation like this. I have
I'm creating a basic database application in WPF, and I have started using the
I have the following situation: My webservice is receiving JSON data and creating models
In my WPF application, I host Win32 content using HwndHost. However, creating a HwndHost
I have been working on and off with Java/Python. Now in this situation I
I have been working on creating a PHP email form recently and cannot manage

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.