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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:36:16+00:00 2026-06-05T10:36:16+00:00

On the click of the button I’m writing this: protected void Button1_Click(object sender, EventArgs

  • 0

On the click of the button I’m writing this:

 protected void Button1_Click(object sender, EventArgs e)
    {
        List<Students> student = new List<Students>()
        {
            new Students {FirstName= "Ram", LastName= "Gol"},
            new Students {FirstName= "Ran", LastName= "Gom"},
            new Students {FirstName= "Rao", LastName= "Gon"},
            new Students {FirstName= "Rap", LastName= "Goo"}
        };

        IEnumerable<Students> empQuery = from s in student
                       where s.FirstName.Length ==3
                       select s.FirstName;
        foreach (var stud in empQuery)
        {
            Button1.Text = stud;
        }

And I’m using System.Collection.Generic also. But I’m getting error of

the type or namespace name ‘Students’ could not be found (are you
missing a using directive or an assembly reference?)

Please let me know what I’m doing wrong.

  • 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-05T10:36:17+00:00Added an answer on June 5, 2026 at 10:36 am
    1. If the Class is defined in the current project skip to step 4.
    2. Make sure that the assembly where Students is defined is in the projects reference folder (or that if it exsits that it is not a broken reference). If it is not there then add it.
    3. If the reference is invalid, delete and re-add it by either pulling in a project reference or browsing to the location of the assembly. It will most likely be in the projects section of add reference.
    4. If the reference is valid, put a Using directive which specifies the Students namespace so it can be used.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Button.Click += new RoutedEventHandler(_click); private void _click(object sender EventArgs e) { //... } In
why are EventHandlers designed this way? void uxSave_Click(object sender, EventArgs e) why not this?
Using .live() : <input type=button value=button /> $(:input[type=button]).live({ click: function() { $(this).after('<input type=button value=new
When click a button,I want to popup a view form bottom,like this! Any help
How to when click Create button add last state of object to array and
I have this click button code \$(#extractmonkeys).click(function () { \$(#grapharea).html( ); \$(#paramselection).html( ); How
i have list view inside list view a button when i click button list
is it possible to open a new view as we click button in UIActionSheet?
I have one button. When i click on this button, it will show one
I have a windows form1 application. This form1 has a click button. When the

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.