Hi nedash,
I have created a sample with your code and its working fine at my side first go through the code thoroughly and implement first in new project and then in your code.
HTML
<div>
<asp:ScriptManager runat="server" />
<asp:Image ID="Img6" Visible="false" CssClass="load" ImageUrl="~/Image/admin/createGallery.jpg"
runat="server" />
<asp:UpdatePanel runat="server">
<ContentTemplate>
<div id="DI1R2">
<asp:ImageButton ID="Imgdelete6" runat="server" CausesValidation="false" CssClass="DPC9_Img2m"
ImageUrl="~/Image/admin/imgdelete.jpg" Visible="false"></asp:ImageButton>
<asp:Label ID="Lblimg6" runat="server" Visible="false"></asp:Label>
<asp:Panel ID="Panel5" runat="server">
<asp:ModalPopupExtender DropShadow="true" ID="ModalPopupExtender1" PopupControlID="PnPopup6"
runat="server" TargetControlID="BtnPopup6" BackgroundCssClass="Modal" CancelControlID="Imgclose">
</asp:ModalPopupExtender>
<asp:Button ID="BtnPopup6" OnClick="BtnPopup6_Click" runat="server" Text="انتخاب ویدیو"
CssClass="DPC9_Img2" BorderStyle="Solid" BorderWidth="0px" BorderColor="White"
CausesValidation="false" />
<asp:Panel ID="PnPopup6" runat="server" BackColor="White" CssClass="panel" Style="display: none">
<div class="CloseImge">
<asp:ImageButton ID="Imgclose" runat="server" CssClass="closeI" ImageUrl="~/Image/admin/imgdelete.jpg"
CausesValidation="false" />
</div>
<div class="CloseImge1">
<asp:TextBox ID="Txtdes" runat="server" CssClass="txtdesA"></asp:TextBox>
<asp:ImageButton ID="ImageButton15" OnClick="BtnUploadL6_Click" runat="server" CausesValidation="false"
ImageUrl="~/Image/admin/createGallery.jpg" CssClass="load" />
</div>
</asp:Panel>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div>
<style type="text/css">
.DPC9_Img2
{
margin: 5px 22px 0 0;
background-color: White;
cursor: pointer;
float: right;
height: 25px;
font-size: 14.5px;
}
.CloseImge
{
float: right;
width: 300px;
}
.closeI
{
float: right;
width: 22px;
height: 22px;
margin: 5px 10px 0 0;
}
#CloseImge1
{
float: right;
width: 500px;
}
.Modal
{
background-color: #2a2a23;
opacity: 0.5;
}
.panel
{
background: url(../image/admin/popup1.png) no-repeat;
float: right;
width: 531px;
height: 118px;
}
.load
{
width: 100px;
height: 70px;
}
.txtdesA
{
border: 1px solid #575757;
float: right;
margin: 18px 65px 0 0;
background-color: White;
direction: rtl;
width: 240px;
font-size: 14px;
}
</style>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$('[id*=ImageButton15]').click(function () { //ImageButton15 is Id of ImageButton.
$('[id*=ModalPopupExtender1]').hide();
});
});
</script>
</div>
C#
protected void BtnPopup6_Click(object sender, EventArgs e)
{
ModalPopupExtender1.Show();
}
protected void BtnUploadL6_Click(object sender, EventArgs e)
{
Lblimg6.Text = Txtdes.Text;
Lblimg6.Visible = true;
Img6.Visible = true;
Imgdelete6.Visible = !(BtnPopup6.Visible = false);
Img6.Visible = true;
}
VB.Net
Protected Sub BtnPopup6_Click(sender As Object, e As EventArgs)
ModalPopupExtender1.Show()
End Sub
Protected Sub BtnUploadL6_Click(sender As Object, e As EventArgs)
Lblimg6.Text = Txtdes.Text
Lblimg6.Visible = True
Img6.Visible = True
Imgdelete6.Visible = Not (InlineAssignHelper(BtnPopup6.Visible, False))
Img6.Visible = True
End Sub
Screenshot