How to get SQL query result in a list

How to get SQL query result in a list




    public class users
        {
            public string user_id { get; set; }
            public string user_name { get; set; }
        }

________________________________________

public List<users> gettest()
        {
            List<users> columnData = new List<users>();
           
            using (SqlConnection connection = new SqlConnection(GetConnectionString()))
            {
                connection.Open();
                string query = "select  user_id,user_name from employee_table";
                using (SqlCommand command = new SqlCommand(query, connection))
                {
                    using (SqlDataReader reader = command.ExecuteReader())
                    {
                     
                        while (reader.Read())
                        {
                            var person = new users();
                            person.user_id = reader["user_id"].ToString();
                            person.user_name = reader["user_name"].ToString();
                            columnData.Add(person);
                        }
                    }
                }
                connection.Close();
            }
            return columnData;
        }

FIND SECOND LARGEST FROM SQL TABLE

Let us consider a table have three fields say Id,Mark,and name.and table name is student.

For getting second largest mark from student table you can use following sql query.

Step 1: get top 2 marks from student table in descending order

Select top 2 mark from student order by Mark desc

Step 2: find minimum from the inner query

Select min(mark) from (inner query)

So the final query will be

Select min(mark) from (select top 2 mark from student order by Mark desc)a

Call webservice in asp.net using javascript

Call webservice in asp.net using javascript
  1. Create a webservice (eg:WebService1.asmx) and add following codes in your webservice cs page
    [WebMethod]public string GetCurrentTime(string name){return "Hello " + name + Environment.NewLine + "The Current Time is: "+ DateTime.Now.ToString();}
    2)   Add the following attribute to the Web Service declaration part: [System.Web.Script.Services.ScriptService]
    3)  Create new aspx page say webform1.aspxand add following in script page
    <asp:ScriptManager ID="ScriptManager1" runat="server"><Services><asp:ServiceReference Path="~/WebService1.asmx" /></Services></asp:ScriptManager>
    <div>Your Name :<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox><input id="btnGetTime" type="button" value="Show Current Time"onclick = "ShowCurrentTime()" /></div><script type = "text/javascript">function ShowCurrentTime1(){var name=document.getElementById("<%= txtUserName.ClientID %>").value;TESTAPP.WebService1.GetCurrentTime(name,resultvalue);}function resultvalue(result){alert(result);}
    </script>

TAGS-cALL WEBSERVICE FROM ASP.NET -WEBSERVICE JAVASCRIPT-CALL WEBSERVICE IN ASP.NET SCRIPT PAGE


Grouping with the fieldset in Asp.net

How To use Grouping in Asp.net

In Windows forms we group box for grouping the items.In web forms we use fieldset for grouping certain controls

<fieldset>
  <legend>Title:</legend>
  username: <input type="text"><br>
  password: <input type="text"><br>
 
 </fieldset>



TAGS:GROUPING IN ASP.NET,HOW TO USE FIELDSET IN ASP.NET,HOW TO USE FIELDSET IN HTML FORMS,GROUPBOX IN ASP.NET WEB FORMS,HOW TO USE GROUPBOX IN ASP.NET WEBFORMS,FIELDSET WITH LEGENDS EXAMPLE-HOW TO USE LEGENDS IN ASP.NET WEBFORMS,

Flowers Tv On Videocon D2h

Flowers TV On Videocon D2h


Flowers Tv added on videocon D2h
Channel No:606
and channel is part of all base packages. its a-la-carte price is Rs 5.



FLOWERS TV VIDEOCON D2H-FLOWERS TV ONAM 2015 MOVIES-FLOWERS TV MALAYALM TV CHANNEL VIDEOCON D2H-FLOWERS TV FREE TO AIR-FLOWERS TV AVAILABILITY VIDEOCON D2H-FLOWER TV  MOVIE RIGHTS-FLOWERS TV MALAYALAM CHANNEL-FLOWERS TV AND KAIRALI PEOPLE ON VIDEOCON D2H-ASIANET HD VIDEOCON D2H-MAZHAVIL MANORAMA HD VIDEOCON D2H-FLOWERS TV AND KAIRALI PEOPLE VIDEOCON D2H

Codework Solutions Infopark Hiring Freshers & Experienced Candidates

Codework Solutions Infopark Hiring Freshers & Experienced Candidates


Freshers ( 2 openings)
B.Tech or M.C.A with minimum 70% marks. Candidates should have good knowledge in C++ or C#.
Email:  hr@codework-solutions.com
Windows Application developer ( C#) - 2 to 3 years
Internet Security Sector

Codework Inc, is a leader in developing Internet Security solutions.

The Windows application Developer will be involved in the windows application development of our popular Internet Security software.

We promote a stimulating and challenging environment that involves the latest technologies.



Candidate Profile

• 2 to 4 years experience in developing windows based application using C#
• Familiarity of multi threading , Sockets
• Should be able to work independently
• Experience in working with database


Codework is a global leader of Internet and Endpoint Security solutions, distributed worldwide. With offices in US, Canada, UK, Australia and Asia.

Apply To:
Interested candidates please apply to: info@codework-solutions.com
Email:  hr@codework-solutions.com
C++ 1 to 3 year experince
Internet Security Sector Codework Inc, is a leader in developing Internet Security solutions. The Windows application Developer will be involved in the windows application development of our popular Internet Security software. We promote a stimulating and challenging environment that involves the latest technologies. Candidate Profile • 1 to 3 years experience in developing windows based application using C++ • Familiarity of multi threading , Sockets • Should be able to work independently • Experience in working with database.

Codework is a global leader of Internet and Endpoint Security solutions, distributed worldwide. With offices in US, Canada, UK, Australia and Asia. Apply To: Interested candidates please apply to: info@codework-solutions.com
Email:  hr@codework-solutions.com




codework solutions infopark jobs-codework solutions infopark c# jobs-currentware infopark jobs-codework solutions infopark fresher jobs-codework solutions infopark fresher jobs-codework solutions kakkanad jobs-codework solutions kerala jobs-codework solutions fresher c++ jobs
tags-Freshers jobs infopark kakkanad-freshers jobs 2015 june-freshers jobs 2015 march-freshers dot net job 2015-experinced dot net jobs kakkanad infopark-kakkanad infopark jobs-infopark dot net jobs-fresher c++ jobs kakkanad infopark-freshers c++ jobs kerala 2015-fresher jobs kakkanad 2015-freshers jobs kakkanad-c# dot net jobs 2015 infopark-c# jobs infopark 2015-dot net jobs 2015 june-c# jobs freshers- software engineer trainee jobs infopark 2015-software developer jobs 2015 infopark kakkanad-dot net software developer jobs 2015

SUYATI TECHNOLOGIES INFOPARK WALK IN(2014-NOVEMBER)

SUYATI TECHNOLOGIES WALK IN







SUYATI TECHNOLOGIES walk in-suyati technologis hiring-suyati technologies job opening 2014 november-suyati technologies interview-suyati technologies interview questions-suyati technologies questions-suyati technologies job opening-suyati technologis ernakulam dot net jobs 2014-suyati technologis jobs 2014-2015-suyati technologie sinfopark jobs 2014 suyati technologies november 2014 jobs-suyati technologies jobs 2014 november






CALL J QUERY FUNCTION IN UPDATEPANEL

CALL J QUERY FUNCTION IN UPDATEPANEL

$('document').ready(function () {
});
normally we use document.ready function in aspx page but it will call only one time(means first time of page loading)if you want to peform this action in multiple time in an upadate panel you can use the following method


  var prm = Sys.WebForms.PageRequestManager.getInstance();
          prm.add_endRequest(function ()
          {

});

jquery problem in ajax update panel,jquery function not works in ajax upadate panel,call jquery method in ajax update panel,jquery  with ajax control toolkit,jquery update panel problem