C# 非常有用。当做 $.post("yourdatabasehandler.aspx", { name: "John", lastname: "Smith" }, function(data) { alert("Response from page:
非常有用。当做C# 非常有用。当做 $.post("yourdatabasehandler.aspx", { name: "John", lastname: "Smith" }, function(data) { alert("Response from page: ,c#,javascript,asp.net,database,popup,C#,Javascript,Asp.net,Database,Popup,非常有用。当做 $.post("yourdatabasehandler.aspx", { name: "John", lastname: "Smith" }, function(data) { alert("Response from page: " + data); }); string name = Request.Params["name"] // Do your database , validation and whatever logic here Response.W
$.post("yourdatabasehandler.aspx", { name: "John", lastname: "Smith" }, function(data) {
alert("Response from page: " + data);
});
string name = Request.Params["name"]
// Do your database , validation and whatever logic here
Response.Write("Cool dude");
window.open("popup_page.aspx?id=" + id + "&name=" + name)
string sID = Request.QueryString("id");
string sName = Request.QueryString("name");
function ShowPopup(strMessage)
{
var returnValue= window.showModalDialog("popup_page.aspx");
}
<asp:Button ID="btnReturnValue" runat="server" Text="Proceed" OnClientClick="window.returnValue='some message';window.close();" />
<script language="javascript">
function GetRowValue(val)
{
window.opener.document.getElementById("ctl00_ContentPlaceHolder1_TextBox2").value = val;
// make sure you change the TextBoxId as respective to your creation
window.close();
}
</script>
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1">
<Columns>
<!-- Reserve the code below, as after you configure data source you -->
<!-- will alter this code drastically therefore-->
<!--you have to make sure to paste this code -->
<!-- again inside this Gridview element once you configure your data source -->
<asp:TemplateField>
<AlternatingItemTemplate>
<asp:Button ID="btnSelect" runat="server" Text="Select" />
</AlternatingItemTemplate>
<ItemTemplate>
<asp:Button ID="btnSelect" runat="server" Text="Select" />
</ItemTemplate>
</asp:TemplateField>
<!-- This part must be reserved -->
</Columns>