Click here to Skip to main content
15,905,004 members
Home / Discussions / C#
   

C#

 
AnswerRe: best connection sql server in c# windows application(clinet/server) Pin
OriginalGriff20-Jun-18 2:25
mveOriginalGriff20-Jun-18 2:25 
AnswerRe: best connection sql server in c# windows application(clinet/server) Pin
Pete O'Hanlon20-Jun-18 3:03
mvePete O'Hanlon20-Jun-18 3:03 
AnswerRe: best connection sql server in c# windows application(clinet/server) Pin
Eddy Vluggen20-Jun-18 7:15
professionalEddy Vluggen20-Jun-18 7:15 
AnswerRe: best connection sql server in c# windows application(clinet/server) Pin
Gerry Schmitz21-Jun-18 8:39
mveGerry Schmitz21-Jun-18 8:39 
GeneralRe: best connection sql server in c# windows application(clinet/server) Pin
Eddy Vluggen22-Jun-18 2:28
professionalEddy Vluggen22-Jun-18 2:28 
QuestionVisual Studio 2017(C#_WinForm), Chameleon3 CM3-U3-13Y3M control question Pin
Member 1387921619-Jun-18 19:39
Member 1387921619-Jun-18 19:39 
AnswerRe: Visual Studio 2017(C#_WinForm), Chameleon3 CM3-U3-13Y3M control question Pin
OriginalGriff19-Jun-18 20:56
mveOriginalGriff19-Jun-18 20:56 
GeneralRe: Visual Studio 2017(C#_WinForm), Chameleon3 CM3-U3-13Y3M control question Pin
Member 1387921619-Jun-18 21:14
Member 1387921619-Jun-18 21:14 
GeneralRe: Visual Studio 2017(C#_WinForm), Chameleon3 CM3-U3-13Y3M control question Pin
OriginalGriff19-Jun-18 21:24
mveOriginalGriff19-Jun-18 21:24 
AnswerRe: Visual Studio 2017(C#_WinForm), Chameleon3 CM3-U3-13Y3M control question Pin
Dave Kreskowiak20-Jun-18 4:27
mveDave Kreskowiak20-Jun-18 4:27 
GeneralRe: Visual Studio 2017(C#_WinForm), Chameleon3 CM3-U3-13Y3M control question Pin
Member 1387921620-Jun-18 16:59
Member 1387921620-Jun-18 16:59 
QuestionC# - Convert Pixels ( X & Y ) points to Longitude and Latitude Pin
Member 1384510217-Jun-18 18:18
Member 1384510217-Jun-18 18:18 
AnswerRe: C# - Convert Pixels ( X & Y ) points to Longitude and Latitude Pin
V.17-Jun-18 18:34
professionalV.17-Jun-18 18:34 
AnswerRe: C# - Convert Pixels ( X & Y ) points to Longitude and Latitude Pin
User 742933817-Jun-18 21:40
professionalUser 742933817-Jun-18 21:40 
GeneralRe: C# - Convert Pixels ( X & Y ) points to Longitude and Latitude Pin
V.17-Jun-18 21:45
professionalV.17-Jun-18 21:45 
GeneralRe: C# - Convert Pixels ( X & Y ) points to Longitude and Latitude Pin
Nathan Minier18-Jun-18 2:03
professionalNathan Minier18-Jun-18 2:03 
QuestionHow can I deserialize different XML files in a list/Array? Pin
SebGM201817-Jun-18 14:51
SebGM201817-Jun-18 14:51 
AnswerRe: How can I deserialize different XML files in a list/Array? Pin
Mycroft Holmes17-Jun-18 20:54
professionalMycroft Holmes17-Jun-18 20:54 
AnswerRe: How can I deserialize different XML files in a list/Array? Pin
Richard MacCutchan17-Jun-18 21:43
mveRichard MacCutchan17-Jun-18 21:43 
QuestionHandling Extraparam From jQGrid In MVC Controller Method Pin
MadDashCoder15-Jun-18 13:03
MadDashCoder15-Jun-18 13:03 
AnswerRe: Handling Extraparam From jQGrid In MVC Controller Method Pin
Richard MacCutchan15-Jun-18 21:19
mveRichard MacCutchan15-Jun-18 21:19 
QuestionNeed to compare textbox with list created by me and then redirect somewhere if successful. Pin
Dhruv Nunia14-Jun-18 0:58
Dhruv Nunia14-Jun-18 0:58 
I have written a code. But don't know where is the error. Please help.

<pre lang="c#"><pre>using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace GridView
{
    public partial class practise : System.Web.UI.Page
    {
       public static List<User> listuser = new List<User>()
       {
                new User() {ID = 1, UserName = "Dhruv", Password = "hello"},
                new User() {ID = 2, UserName = "Gaurav", Password = "12345"},
                new User() {ID = 3, UserName = "Rahul", Password = "asdfg"},
                new User() {ID = 4, UserName = "Guru", Password = "qwerty"}
       };

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                listuser = new List<User>();
                GRIDDATA.DataSource = listuser;
                GRIDDATA.DataBind();
            }
        }

        protected void Button1_Click(object sender, EventArgs e)

        {

            User data = new User();
            data.UserName = TextBox1.Text;
            data.Password = TextBox2.Text;
            //listuser.Add(data);

            bool UserExists(string userName, string password)
            {
                return listuser.Any(a => a.UserName.Equals(userName, StringComparison.CurrentCultureIgnoreCase) && a.Password.Equals(password));
            }

            if(UserExists(data.UserName, data.Password))
            {
                
                Response.Redirect("https://www.googel.com");
            }
        }
    }


    public class User
    {   
        public int ID { get; set; }
        public string UserName { get; set; }
        public string Password { get; set; }   
    }
}

AnswerRe: Need to compare textbox with list created by me and then redirect somewhere if successful. Pin
Eddy Vluggen14-Jun-18 2:23
professionalEddy Vluggen14-Jun-18 2:23 
GeneralRe: Need to compare textbox with list created by me and then redirect somewhere if successful. Pin
Richard Deeming14-Jun-18 2:30
mveRichard Deeming14-Jun-18 2:30 
GeneralRe: Need to compare textbox with list created by me and then redirect somewhere if successful. Pin
Eddy Vluggen14-Jun-18 2:56
professionalEddy Vluggen14-Jun-18 2:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.