Well! I tried your problem statement. And I have framed solution for same given below.
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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>Edit value from Popup</title>
<style type="text/css">
.ModalPopupBG
{
background-color: rgb(230, 255, 191);
filter: alpha(opacity=50);
-moz-opacity: 0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<ajax:ToolkitScriptManager ID="scriptManager" runat="server" EnablePageMethods="true" />
<h2>
Edit from ModalPopup</h2>
<asp:UpdatePanel ID="UpdateProg1" runat="server">
<ContentTemplate>
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" />
</ContentTemplate>
</asp:UpdatePanel>
<asp:Label ID="lblCat_Prefix" runat="server" Text="Categorised as: "></asp:Label>
<asp:UpdatePanel ID="updBeerCat" runat="server">
<ContentTemplate>
<ajax:ModalPopupExtender ID="modalPopup" runat="server" BackgroundCssClass="ModalPopupBG"
TargetControlID="HyperLink1" PopupControlID="UpdateProg1" />
<asp:HyperLink ID="HyperLink1" runat="server" Style="display: none;" />
<asp:LinkButton ID="lnkEditStyle" runat="server" Text="(Edit)" OnClick="lnkEditStyle_Click" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="lnkEditStyle" />
</Triggers>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
Default.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void lnkEditStyle_Click(object sender, EventArgs e)
{
modalPopup.Show();
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
lnkEditStyle.Text = "Update";
modalPopup.Hide();
}
}
Test it and let us know back if it helped you or not.