Hello Forum,
How can I pass every control that is on image control to another image control in another web form?
For example, I have some labels and child image controls which are placed on a parent image control, and I want to click a button and pass the parent image with the labels and child image controls to another web page without affecting the positions, size, fonts and color of the controls.
If I set the label fore color and font-size, the event should not affect it when passing to another web form.
Here is what I tried but it is not working
HTML (Page 1)
<div class="wrapper">
<div class="line"></div>
<div class="form-horizontal">
<div class="col">
<div class="child" id="midcont">
<asp:Image ID="Image1" runat="server" width="350px" Height="500px" BorderWidth="1pt" BorderStyle="Solid" />
<div id="child1">
<div id="chill">
<asp:Image ID="Image4" runat="server" BorderStyle="None" Width="100px" Height="110px" />
</div>
<div id="nann" style="right: 35%;">
<asp:Label ID="Label4" runat="server" Text="Samuel Tochi James" Font-Size="9pt" Width="150"></asp:Label>
<script>
function settext(e) {
document.getElementById("<%= Label4.ClientID %>").innerHTML = e.value;
}
</script>
</div>
<div id="organ" style="max-width: 50%;">
<asp:Label ID="orgname" runat="server" Text="COMPANY/ORGANIZATION NAME" Font-Size="9pt"></asp:Label>
</div>
<div id="post">
<asp:Label ID="labelpost" runat="server" Text="Employee/Student Position" Font-Size="9pt"></asp:Label>
</div>
<div id="number">
<asp:Label ID="labelnum" runat="server" Text="ID Number" Font-Size="9pt"></asp:Label>
</div>
<asp:Image ID="Image2" runat="server" BorderStyle="None" Width="40px" Height="40px" onchange="ImagePreview(this);"/>
</div>
</div>
</div>
</div>
</div>
<br />
<asp:Button ID="Button1" runat="server" CssClass="btn btn-primary navbar-btn" BackColor="SteelBlue" Text="Pass Data" OnClick="Button1_Click" />
C# (Page 1)
public partial class Default2 : System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
string image = (sender as Button).PostBackUrl;
Session["Image"] = image;
Response.Redirect("AAB.aspx");
}
}
HTML (Page 2)
<div class="container-fluid2" style="background-color: #ffffff; width: auto;">
<div class="child" id="midcont">
<asp:Image ID="Image1" runat="server" width="350px" Height="500px" BorderWidth="1pt" BorderStyle="Solid" />
</div>
</div>
C# (Page 2)
public partial class AAB : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["Image"] != null)
{
Image1.ImageUrl = Session["Image"].ToString();
}
}
}