Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi

how to define for Users and Validateuser?

am getting some error in my code

<pre>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

public partial class ImagePopup : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void GetUsers()
    {       
        DataTable dt;
        dt = Users.getUsers(1);//here am getting error for Users
        DataView dv = dt.DefaultView;
        grdPublicDir.DataSource = dv;
        grdPublicDir.DataBind();

    }
    protected void grdPublicDir_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "ViewProfile")
        {
            ProfileInfo(Convert.ToInt32(e.CommandArgument.ToString()));
            viewProfile.Show();

        }
    }

    protected void ProfileInfo(int pID)
    {
        
        try
        {
           DataTable dt = Validateuser.getprofile(pID);//and here for Validateuser am getting error like not defined.            

            if (dt.Rows.Count &gt; 0)
            {
                //Code to assign values to controls               
             }

        }

        catch (Exception ex)
        {

        }
    }    
}</pre>

thank you


this code i copied from
http://www.dotnetfunda.com/articles/article1595-displaying-user-details-using-modalpopupextender.aspx[^]

this artical
Posted
Updated 6-Mar-13 19:57pm
v2

1 solution

Since you got the code from someone else, then the logical thing to do is contact them directly, not us. The page you direct us to is not exactly short of social media buttons, and has a "write response" link which I'm fairly sure should do something useful.

Basically, you don't have all the code. You need to include whatever code of his contains the User class before you can continue - but from the quality of that code sample, I probably wouldn't bother myself...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900