Introduction:
I have scenario that I have admin setting for back ground. Whatever
image I uploaded. I want to set dynamic background image on body of form.
Approach
<body runat="server" id="BodyTag">
In your code behind, do this (C#):
I have data table with uploaded image name. I have made
absolute path available for image.
String myImagePath = "../Images/Upload/"+dt_Background.Rows
[0]["ImageURL"].ToString ();
BodyTag.Style.Add ("background-image",
"url("+myImagePath+")");
In body tag with image path “~/Images” is not working.
No comments:
Post a Comment