To implement graphics and images using user control.
Step 1: Design the webpages in visual studio.
Step 2: Open website >> Add new item >> web user control.
Step 3: Place a label in design view.
Step 4: Add the code in the page load( ).
Step 5: Use GDI+ for set of classes design for drawing images.
Step 6: Using web application to create dynamic web page.
Step 7: Specify the height ,width in the pixels , save a images in the browser by using this code.
Image.save(Response.OutputStream.system.Drawing.imaging.imageFormat.gif)
Step 8: In the design page required user controls should be used.
Step 9: In button event giving the code for view picture save it.
Step10: Run the program in the browser.
PROGRAM
Login
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="aboutus.aspx.vb" Inherits="aboutus" %>
<%@ Register src="WebUserControl.ascx" tagname="WebUserControl" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title> <table class="style15">
<tr>
<td>
<uc1:WebUserControl ID="WebUserControl1" runat="server" />
</td>
<td>
</td>
</tr>
</table>
</html>
USER CONTROL
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="WebUserControl.ascx.vb" Inherits="WebUserControl" %>
<style type="text/css">
<p>
<img alt="" src="images/Untitled-1.gif" style="width: 256px; height: 71px" /><br />
<img alt="" src="images/add1.jpg" style="width: 761px; height: 87px; text-align: center;" /></span></p>
Diet pills
0 comments:
Post a Comment