Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logon.aspx logo image not displaying #74

Closed
sneevand opened this issue Mar 15, 2018 · 1 comment
Closed

Logon.aspx logo image not displaying #74

sneevand opened this issue Mar 15, 2018 · 1 comment

Comments

@sneevand
Copy link

Hi Guys,

We like to show company logo on custom landing page; used below code but the image is not displayed on the page.

  protected System.Web.UI.WebControls.Image ImgLogo;

  private void Page_Load(object sender, System.EventArgs e)
  {
        //Stream fs = FileUpload1.PostedFile.InputStream;
        //BinaryReader br = new BinaryReader(fs);
        //Byte[] bytes = br.ReadBytes((Int32)fs.Length);
        //string base64String = Convert.ToBase64String(bytes, 0, bytes.Length);

        byte[] imageData = null;
        FileInfo fileInfo = new FileInfo("cdrivepath");
        long imageFileLength = fileInfo.Length;
        FileStream fs = new FileStream("cdrivepath", FileMode.Open, FileAccess.Read);
        BinaryReader br = new BinaryReader(fs);
        imageData = br.ReadBytes((int)imageFileLength);
        string base64String = Convert.ToBase64String(imageData, 0, imageData.Length);


        ImgLogo.ImageUrl = "data:image/png;base64," + base64String;

    }

Code works fine on empty page; and other web app projects.

Regards,

Navin

@jtarquino
Copy link
Member

This project handles the sample code release, bugs and issues
For product issues I would recommend you to contact support and they can help you to identify the best way to solve your problem or use the forums https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlreportingservices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants