Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 30th, 2015, 04:50 PM
Authorized User
 
Join Date: Aug 2012
Posts: 19
Thanks: 8
Thanked 0 Times in 0 Posts
Default Chapter 10 updatepanel problem

Hello.
my updatepanel won't work in content page, that mean page_load and click event of the button dose not fire but page_preinit fires.
whenever i use an aspx page without masterpage everything works correctly.

Code :

Content Page :
HTML Code:
<%@ Page Title="" Language="C#" MasterPageFile="~/Frontend.master" AutoEventWireup="true" CodeFile="RegEstate.aspx.cs" Inherits="RegEstate" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cpMC" runat="Server">
    <section class="wrapper style2">
        <div class="container">
            <header class="major">
                <asp:Button ID="btn" Text="click" runat="server" OnClick="btn_Click"/>
                <asp:UpdatePanel runat="server">
                    <ContentTemplate>
                        <asp:TextBox ID="txtBox" runat="server" />
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btn" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
            </header>
        </div>
    </section>
</asp:Content>
MasterPage:

HTML Code:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Frontend.master.cs" Inherits="Frontend" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Arcana by HTML5 UP</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <!--[if lte IE 8]><script src="assets/css/ie/html5shiv.js"></script><![endif]-->
    <link rel="stylesheet" href="assets/css/main.css" />
    <!--[if lte IE 8]><link rel="stylesheet" href="assets/css/ie/v8.css" /><![endif]-->
    <!--[if lte IE 9]><link rel="stylesheet" href="assets/css/ie/v9.css" /><![endif]-->
    <!--[if lte IE 8]><script src="assets/css/ie/respond.min.js"></script><![endif]-->
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="SM" runat="server" />
</form>
Thank you
 
Old May 30th, 2015, 06:29 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Maybe this helps? https://msdn.microsoft.com/en-us/lib...vs.140%29.aspx

The master page needs the ScriptManager control.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 5th, 2015, 11:18 AM
Authorized User
 
Join Date: Aug 2012
Posts: 19
Thanks: 8
Thanked 0 Times in 0 Posts
Default Hello

Hello , Thanks for your respond , i wish you were my teacher ;)
My problem has been solved by removing nested <form> element in the master page i didn't pay attention to the extra <form> element





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 10 - UpdatePanel question caiman BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 August 15th, 2010 12:05 PM
Ch. 10: UpdatePanel makes page disappear JohnInPomeroy BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 April 1st, 2010 04:20 PM
chapter 10 problem nikItas BOOK: Beginning Access 2003 VBA 1 August 5th, 2008 08:54 AM
CH 10 Updatepanel - Design view RobertVL ASP.NET 3.5 Basics 2 July 6th, 2008 06:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.