Exemple #1
0
    protected String GetImageUrl(int poster_id, int is_admin)
    {
        if (is_admin == 0)
        {
            return(blog.GetProfilePicName(poster_id));
        }

        else
        {
            return("/Admin/Resources/Images/ProfilePic/Admin_pp.jpg");
        }
    }
Exemple #2
0
    protected String GetImageUrl(int poster_id, int is_admin)
    {
        try
        {
            if (is_admin == 0)
            {
                return(blogviewer.GetProfilePicName(poster_id));
            }

            else
            {
                return("/Admin/Resources/Images/ProfilePic/Admin_pp.jpg");
            }
        }
        catch (Exception ex)
        {
            ErrorReportBAL error = new ErrorReportBAL();
            error.SendErrorReport("ViewPost.aspx", ex.ToString());
            //Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>");
            return(null);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session["user_id"] == null)
            {
                Response.Redirect("~/sign_in.aspx");
            }

            UserName.Text = getusername.UserNameFetch(Convert.ToInt32(Session["user_id"]));


            //profile_pic.Src = "/HitFromDeepak" + getusername.GetProfilePicName(Convert.ToInt32(Session["user_id"]));

            if (Session["user_login_social"] != null)
            {
                String image_path = Session["user_pp"].ToString();


                String[] newpath = image_path.Split('?');

                img_profile_pic.Src = newpath[0] + "?width=200&height=200";
            }

            else
            {
                img_profile_pic.Src = getusername.GetProfilePicName(Convert.ToInt32(Session["user_id"]));
            }
        }
        catch (Exception ex)
        {
            ErrorReportBAL error = new ErrorReportBAL();
            error.SendErrorReport("ProfileMasterPage.aspx", ex.ToString());
            Response.Write("<script>alert('Some Error Occured \n Sorry for inconvenience');</script>");
        }
    }