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

The Archive Base Latest Questions

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

Following code is an example, I just want to know if this can be

  • 0

Following code is an example, I just want to know if this can be done.

I have an test.aspx file with this server side include tag;

<!--#include file="listOfCountries.htm" -->

Within listOfCountries.htm, I have:

<html>
<div>
<select id="countryList" runat="server">
<option></option>
...
</select>
</div>
</html>

Now, Is there a way to access “countryList” in test.aspx.cs file ?

On another note, say I didn’t have the #include “Countries.htm” in test.aspx, is it possible to access the controls within Countries.htm from test.aspx.cs ? (i.e. accessing an external html file controls in cs)

  • 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-13T20:24:29+00:00Added an answer on May 13, 2026 at 8:24 pm

    As far as I’m aware, what you’re asking for isn’t possible as the include file isn’t actually parsed as asp.net.

    What you want to do is create a “User Control” by right clicking on your project, choosing “Add new Item” and choosing “Web User Control” from the window that appears.

    Within your user control you can define the markup for “countries.htm”, and then expose the contents of the <select> to your C# code.

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

Sidebar

Related Questions

I have the following example code: class A(object): def __init__(self, id): self.myid = id
I'm a newbie to ruby, I want to know if I can use just
The C# 3.0 spec has the following code example in section 10.6.1.3 Output parameters:
Take the following code for example; if (Convert.ToString(frm.WindowState) == Minimized) Layout.WindowState = Maximized; else
I'm trying to compile the following simple DL library example code from Program-Library-HOWTO with
I have a bit of code I'm running to test multithreading in MATLAB mex
I have the following code to render text in my app, first i get
I want to know if I can tell what appdomain a object was created
Following code, when compiled and run with g++, prints '1' twice, whereas I expect
The following code works great in IE, but not in FF or Safari. I

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.