Friday, March 14, 2008

Step one Copy paste this code in html part.

make sure that css path will find.

css is as folows

.modalBackground

{

background-color:Gray;

filter:alpha(opacity=70);

opacity:0.7;

}

[asp:Label ID="lblMPE" runat="server" text=""][/asp:Label]

[asp:Panel ID="Panel1" runat="server" Style="display: none"]

[asp:Panel ID="Panel3" runat="server" CssClass="blue_light1" ]

[div style=" background-color: #f2f1f0;" id="divUnderAge13"

runat="server"]

[table width="350" border="0" cellspacing="0" cellpadding="0"]

[tr]

[td style="width: 4px;"]

[img src="images/grey_box_big_tleft.gif" width="4" height="27"

alt="" /]

[/td]

[td style="background-image: url(images/grey_box_big_tmiddle.gif);

background-repeat: repeat-x;" class="heading_white1"]

Account Registration

[/td]

[td style="width: 4px;"]

[img src="images/grey_box_big_tright.gif" width="4" height="27"

alt="" /][/td]

[/tr]

[tr]

[td style="background-image: url(images/grey_box_big_mleft.gif);

background-repeat: repeat-y;

width: 4px;"]

[/td]

[td]

[table width="94%" style="height: 55px;" border="0" align="center"

cellpadding="0"

cellspacing="0"]

[tr]

[td valign="top"]

[table cellpadding="0" cellspacing="0" border="0"

width="98%"]

[tr]

[td style="height:25px"]

[/td]

[/tr]

[tr]

[td ]

The Site is not intended for or directed

to persons under the age of 13.

Because, if you register for an account

with us, you represent to us.

that's why you are 13 years of age or

older. (Dummy Text)*

[/td]

[/tr]

[tr]

[td style="height:15px"]

[/td]

[/tr]

[tr][td align="center"]

[asp:ImageButton ID="OkButton" runat="server"

ImageUrl="~/images/ok_btn.gif" AlternateText="Okay" OnClick="OkButton_Click" /]

[/td][/tr]

[tr]

[td style="height:15px"]

[/td]

[/tr]

[/table]

[/td]

[/tr]

[/table]

[/td]

[td style="background-image: url(images/grey_box_big_mright.gif);

background-repeat: repeat-y;

width: 4px;"]

[/td]

[/tr]

[tr]

[td valign="top"]

[img src="images/grey_box_big_bleft.gif" width="4" height="4"

alt="" /][/td]

[td valign="top" style="background-image:

url(images/grey_box_big_bmiddle.gif); background-repeat: repeat-x;"]

[/td]

[td valign="top"]

[img src="images/grey_box_big_bright.gif" width="4" height="4"

alt="" /][/td]

[/tr]

[/table]

[/div]

[p style="text-align: center;"]

[/p]

[/asp:Panel]

[/asp:Panel]

[ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"

TargetControlID="lblMPE"

PopupControlID="Panel1"

BackgroundCssClass="modalBackground"

OnOkScript="onOk()"

DropShadow="false"

Drag="false"

PopupDragHandleControlID="Panel3"

/]

Step 2) now on code behind

if (true)

{

ModalPopupExtender1.Show();

}

else

{

}

Mahesh K. Sharma.

E-mail me

mahesh.sharma@live.in

No comments: