At the moment i have this:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl2.ascx.cs" Inherits="Drawing.Usercontrols.WebUserControl2" %>
<asp:Image ID="Image1" runat="server" alt="Image Not Found" ImageUrl="~/images/k8up7l1i.bmp"/>
in the webUserControl2.ascx page.
In WebUserControl2.ascx.cs page, all of the logic is found. An Image is generated there, and then saved to a path (C:\Work Drawing\Drawing\Drawing\images) where:
string thisPathName = System.Web.Hosting.HostingEnvironment.MapPath("~/Images/" + randomFileName);
My question is, can i call a method "getPathName()" from the asp page (where ImageUrl is, instead of a static URL). So each time i call it, the new image will be displayed in the browser with that pathname generated in the c# code?
Please notify me if the question was unclear.