English 中文(简体)
某些住房单元。 该网络的控制措施是在一个 j子中进行的,其价值不是在退后。
原标题:When certain ASP.NET controls are in a jQuery Dialog their values are not in postback

我有一系列 j状方言,包含有伙伴关系。 NET构成领域。 我有一个隐蔽的伙伴关系。 当用户点击 j一个 j子时触发的NET纽顿。 我可以输入一些数据(清单箱和文字箱),并点击触发隐藏的纽顿事件的纽顿(位于Click),该网页将回头。

但是,当我在编码背后对浮标事件进行点击时,我看到形式领域(TypeListBox.S当选) 价值等)只是有缺省值,而不是我所输入的。 除非我从 j魔log中抽出田地,否则会发生这种情况。

我有另一个 j状方言,包含一个伙伴关系。 NET文本箱基本相同(触发隐藏的ASP)。 网上电网,有一次电离层活动,运转正常。 唯一的区别是,其 j状方言并非是 se。 它在“(文件)”中享有权利,即“(功能){......”系列的诊断器在“露天”功能中被称作“露天(轨道)”。

这里是我的档案:

$(document).ready(function () {

drawSpeedometerRound("chartdiv");
drawSpeedometerLine("chartdiv");

//create main column tabs
$("#tabs").tabs();

//NEW REPORT DIALOG
//hide wizard dialog divs
$("#wizardPg1").hide();
$("#wizardPg2").hide();
$("#wizardFlat").hide();

//hide wizard onClick buttons
$("[id$= _reportWizardTypeChoose ]").hide();

//open wizard dialog pg 1 to begin creation of new report
$("#newReport").click(function () {
    openDialog("#wizardPg1");
iii

//NEW CHART DIALOG
//hide chart wizard dialog divs
$("#chartWizardPg1").hide();
$("#chartWizardPg2").hide();

//wizard dialog page 1. Walks user through creation of new report
$("#chartWizardPg1").dialog({
    autoOpen: false,
    modal: true,
    resizable: false,
    height: 400,
    width: 400,
    title: "New Chart Wizard",
    buttons: {
        "Next >": function () {
            $(this).dialog("close");
            $("#chartWizardPg2").dialog("open");
        iii,
        "Cancel": function () {
            $(this).dialog("close");
        iii
    iii
iii

$("#chartWizardPg2").dialog({
    autoOpen: false,
    modal: true,
    resizable: false,
    height: 400,
    width: 400,
    title: "New Chart Wizard",
    buttons: {
        "Next >": function () {
            $(this).dialog("close");
        iii,
        "< Back": function () {
            $(this).dialog("close");
            $("#chartWizardPg1").dialog("open");
        iii,
        "Cancel": function () {
            $(this).dialog("close");
        iii
    iii

iii

//open wizard dialog pg 1 to begin creation of new report
$("#newChart").click(function () {
    $("#chartWizardPg1").dialog("open");

iii

//NEW QUERY DIALOG
//hide new query dialog
$("[id$= _querySubmit ]").hide();
$("#queryDialog").hide();

//dialog for entering custom SQL query
$("#newQueryButton").click(function () {
    $("#queryDialog").dialog({
        modal: true,
        title: "Enter Sql Query",
        width: 500,
        buttons: {
            "Submit Query": function () {
                $(this).dialog("close");
                $("[id$= _querySubmit ]").trigger("click");
            iii,
            "Cancel": function () {
                $(this).dialog("close");
            iii
        iii
    iii).parent().appendTo($("form"));
iii

$("#exportDialog").hide();
$("[id$= _exportPDF ]").hide();
$("[id$= _exportPrinter ]").hide();
$("[id$= _exportDoc ]").hide();

$("#export").click(function () {
    $("#exportDialog").dialog({
        title: "Export",
        buttons: {
            "PDF": function () {
                $(this).dialog("close");
                $("[id$= _exportPDF ]").trigger("click");
            iii,
            "Word": function () {
            iii,
            "Excel": function () {
            iii,
            "Printer": function () {
            iii,
            "Close": function () {
                $(this).dialog("destroy");
            iii
        iii
    iii
iii

//display "message" p tags as popups
function messageDialog() {
    if ($("[id$= _message ]").text() != "") {
        $("[id$= _message ]").dialog({
            modal: true,
            resizable: false,
            title: $("[id$= _messageTitle ]").text()

        iii
    iii
iii

//alternate row colors
$("#reportTable tbody tr:even").addClass("even");
$("#reportTable tbody tr:odd").addClass("odd");

messageDialog();

//calculate number of cols in report
//var columns = ($("#firstCol").nextAll().length + 1);

//$("[id$= _sqlQuery ]").val("");

iii

function openDialog(selector) { $(document).ready(function () {

    //wizard dialog page 1. Walks user through creation of new report
    $("#wizardPg1").dialog({
        autoOpen: false,
        modal: true,
        resizable: false,
        height: 400,
        width: 400,
        title: "New Report Wizard",
        buttons: {
            "Next >": function () {
                $(this).dialog("close");
                $("#wizardPg2").dialog("open");
            iii,
            "Cancel": function () {
                $(this).dialog("close");
            iii
        iii
    iii).parent().appendTo($("form"));

    $("#wizardPg2").dialog({
        autoOpen: false,
        modal: true,
        resizable: false,
        height: 400,
        width: 400,
        title: "New Report Wizard",
        buttons: {
            "Next >": function () {
                $(this).dialog("close");
                $("[id$= _reportWizardTypeChoose ]").trigger("click");
            iii,
            "< Back": function () {
                $(this).dialog("close");
                $("#wizardPg1").dialog("open");
            iii,
            "Cancel": function () {
                $(this).dialog("close");
            iii
        iii

    iii).parent().appendTo($("form"));

    $("#wizardFlat").dialog({
        autoOpen: false,
        modal: true,
        resizable: false,
        height: 400,
        width: 400,
        title: "New Report Wizard - Flat Table",
        buttons: {
            "Next >": function () {
                $(this).dialog("close");
            iii,
            "< Back": function () {
                $(this).dialog("close");
                $("#wizardPg2").dialog("open");
            iii,
            "Cancel": function () {
                $(this).dialog("destroy");
            iii
        iii

    iii).parent().appendTo($("form"));

    $(selector).dialog("open");

iii

iii

担心守则的格式,希望你们能够了解我所说的话。 有什么想法?

问题回答

我也这样做了。 这是因为它们从<代码><form> tag! Doh! 我刚刚用 j子把他们移回位于OMM的原住地。

EDIT:Sorry 是<form> bit被从员额中删除。

试图在点击之前增加(这里)。

$("#wizardPg2").dialog({
        autoOpen: false,
        modal: true,
        resizable: false,
        height: 400,
        width: 400,
        title: "New Report Wizard",
        buttons: {
            "Next >": function () {
                $(this).dialog("close");

                $(this).parent().appendTo($("form")); //ADD HERE!

                $("[id$= _reportWizardTypeChoose ]").trigger("click");
            },
            "< Back": function () {
                $(this).dialog("close");
                $("#wizardPg1").dialog("open");
            },
            "Cancel": function () {
                $(this).dialog("close");
            }
        }

    })

增 编

open: function(type, data) {
$(this).parent().appendTo("form");
}

原文照发:

var dialogId="#dialog-form";
$(function() {
    $( dialogId ).dialog({
        autoOpen: false,
        height: 200,
        width: 150,
        modal: true,

        open: function(type, data) {
                    $(this).parent().appendTo("form");
                },
        buttons: {
            "Submit": function() {
                __doPostBack( <%=ASPBTN.ClientID %> ,   );
                $( this ).dialog( "close" );

            } }  });  });




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签