Asp.net programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this Asp.net and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Asp.net Website by URL, How to Play YouTube Videos in Asp.net by using Jquery , Jquery Change div background on mouseover in asp.net , JQuery UI Datepicker (Calendar) etc.

Sunday, February 22, 2015

Example of Asp.net PlaceHolder Server Control

Example of Asp.net PlaceHolder Server Control:



Asp.net PlaceHolder web Control:

 In the post post we give some theory related to the place holder asp.net control. Now we consider a example here. 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  
<script runat="server">  
    protected void Button1_Click(object sender, EventArgs e)  
    {  
        Image img = new Image();  
        img.ImageUrl = @"~/Images/sea.jpg";  
        img.BorderWidth = 3;  
        img.BorderColor = System.Drawing.Color.SaddleBrown;  
        PlaceHolder1.Controls.Add(img);  
    }  
</script>  
  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <title>asp.net PlaceHolder example: how to use</title>  
</head>  
<body>  
    <form id="form1" runat="server">  
    <div>  
        <h2 style="color:Navy">PlaceHolder Example</h2>  
        <asp:PlaceHolder   
            ID="PlaceHolder1"  
            runat="server"  
            >  
        </asp:PlaceHolder>  
        <br />  
        <asp:Button   
             ID="Button1"   
             runat="server"   
             Text="Add Image Control"   
             OnClick="Button1_Click"   
             Font-Bold="true"  
             ForeColor="SaddleBrown"  
             />  
    </div>  
    </form>  
</body>  
</html>  


Asp.net Related Other Post:

No comments:

Post a Comment