0

画像の URL をセッションに保存したいのですが、この URL を別のページに読み込み、画像ボタンに読み込みます。それは可能ですか?次のコードを使用して画像の URL を保存します。

Image = Image1.ImageUrl.ToString();
                        Session["logo"] = Convert.FromBase64String(Image);

しかし、次のようなエラーが表示されます。

The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters.

この画像のURLを取得した別のページ、

protected void Page_Load(object sender, EventArgs e)
{  
    Image img =(Image)Session["logo"];
    ImageButton1.Controls.Add(img);
}

上記のコードでもエラーが発生します。だから私を助けてください。

4

1 に答える 1