谁能解决这个问题?

谁能解决这个问题?

问题描述:

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





此代码我复制了

http://www.dotnetfunda.com/articles/article1595-displaying-user-details-using- modalpopupextender.aspx [ ^ ]



这个艺术



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

this artical

因为你得到了别人的代码那么合乎逻辑的做法是直接联系他们,而不是我们。您指引我们的页面并不完全没有社交媒体按钮,并且有一个写响应链接,我相当肯定应该做一些有用的事情。



基本上,你没有所有的代码。在继续之前,你需要包含他包含User类的任何代码 - 但从代码示例的质量来看,我可能不会打扰自己......
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...