Click here to Skip to main content
15,912,285 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionabout asp.net repeater Pin
laxmanSatnav18-Feb-09 1:44
laxmanSatnav18-Feb-09 1:44 
AnswerRe: about asp.net repeater Pin
keyur satyadev18-Feb-09 1:50
keyur satyadev18-Feb-09 1:50 
QuestionWeb service calling VB6 exe Pin
mpavas18-Feb-09 1:41
mpavas18-Feb-09 1:41 
QuestionGet video from Youtube in my website Pin
Nekkantidivya18-Feb-09 1:38
Nekkantidivya18-Feb-09 1:38 
AnswerRe: Get video from Youtube in my website Pin
Ngr Wirawan10-Jun-09 9:26
Ngr Wirawan10-Jun-09 9:26 
QuestionContains both secure and non secure items Pin
Sarfaraj Ahmed18-Feb-09 0:40
Sarfaraj Ahmed18-Feb-09 0:40 
AnswerRe: Contains both secure and non secure items Pin
Vega0218-Feb-09 21:20
Vega0218-Feb-09 21:20 
QuestionAjax and ASP.NET Pin
asenaici18-Feb-09 0:23
asenaici18-Feb-09 0:23 
Hi
I have placed objects Button and 12 objects Panel on an UpdatePanel.
When i click on a button, a panel appears (on the event OnClik, the precedent panel become invisible, and the new panel become visible)

Despite the object ScriptManager and UpdatePanel, when i click on the button, all the screen refresh. Is it normal ?
It has seemed to me that with Ajax, the screen does not refresh !

Thank you for advance Smile | :)

Here are the sources.
GestionAgenda.aspx :
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GestionAgenda2.aspx.cs" Inherits="GestionAgenda" StyleSheetTheme="Thème1" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<%@ Register assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>

<!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>Page sans titre</title>
    <style type="text/css">
        .style26
        {
            color: #0066FF;
            font-weight: bold;
            height: 23px;
        }
        </style>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 731px; height: 49px">
    
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    
        <br />
        <br />
        <br />
        <br />
        <br />

    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>          
    <p class="style26">
        <asp:Button ID="Bn01" runat="server" onclick="Bn01_Click" Text="Janvier" />
        <asp:Button ID="Bn02" runat="server" onclick="Bn01_Click" Text="Février" />
        <asp:Button ID="Bn03" runat="server" onclick="Bn01_Click" Text="Mars" />
        <asp:Button ID="Bn04" runat="server" onclick="Bn01_Click" Text="Avril" />
        <asp:Button ID="Bn05" runat="server" onclick="Bn01_Click" Text="Mai" />
        <asp:Button ID="Bn06" runat="server" onclick="Bn01_Click" Text="Juin" />
        <asp:Button ID="Bn07" runat="server" onclick="Bn01_Click" Text="Juillet" />
        <asp:Button ID="Bn08" runat="server" onclick="Bn01_Click" Text="Août" />
        <asp:Button ID="Bn09" runat="server" onclick="Bn01_Click" Text="Septembre" />
        <asp:Button ID="Bn10" runat="server" onclick="Bn01_Click" Text="Octobre" />
        <asp:Button ID="Bn11" runat="server" onclick="Bn01_Click" Text="Novembre" />
        <asp:Button ID="Bn12" runat="server" onclick="Bn01_Click" Text="Decembre" />
    </p>        
        <asp:Panel ID="Panel1" runat="server" BackColor="Lime" Height="125px">
          <asp:CheckBoxList ID="CheckBoxList1" runat="server" Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
          </asp:CheckBoxList>
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server" BackColor="Yellow" Height="125px" Visible="False">
          <asp:CheckBoxList ID="CheckBoxList2" runat="server" 
                  Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
          </asp:CheckBoxList>
        </asp:Panel>
        <asp:Panel ID="Panel3" runat="server" BackColor="Blue" Height="125px" 
             Width="694px" Visible="False">
          <asp:CheckBoxList ID="CheckBoxList3" runat="server" 
              Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
        </asp:CheckBoxList>
    </asp:Panel>    
    <asp:Panel ID="Panel4" runat="server" BackColor="Lime" Height="125px" 
        Width="694px" Visible="False">
        <asp:CheckBoxList ID="CheckBoxList4" runat="server" Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
        </asp:CheckBoxList>
    </asp:Panel>
    <asp:Panel ID="Panel5" runat="server" BackColor="Yellow" Height="125px" 
        Width="694px" Visible="False">
        <asp:CheckBoxList ID="CheckBoxList5" runat="server" 
    Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
        </asp:CheckBoxList>
    </asp:Panel>
    <asp:Panel ID="Panel6" runat="server" BackColor="Blue" Height="125px" 
        Width="692px" Visible="False">
         <asp:CheckBoxList ID="CheckBoxList6" runat="server" 
    Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
        </asp:CheckBoxList>
    </asp:Panel>    
    <asp:Panel ID="Panel7" runat="server" BackColor="Lime" Height="125px" 
        Width="694px" Visible="False">
        <asp:CheckBoxList ID="CheckBoxList7" runat="server" Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
        </asp:CheckBoxList>
    </asp:Panel>
    <asp:Panel ID="Panel8" runat="server" BackColor="Yellow" Height="125px" 
        Width="694px" Visible="False">
        <asp:CheckBoxList ID="CheckBoxList8" runat="server" 
    Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
        </asp:CheckBoxList>
    </asp:Panel>
    <asp:Panel ID="Panel9" runat="server" BackColor="Blue" Height="125px" 
        Width="694px" Visible="False">
         <asp:CheckBoxList ID="CheckBoxList9" runat="server" 
    Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
        </asp:CheckBoxList>
    </asp:Panel>    
    <asp:Panel ID="Panel10" runat="server" BackColor="Lime" Height="125px" 
        Width="694px" Visible="False">
        <asp:CheckBoxList ID="CheckBoxList10" runat="server" Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
        </asp:CheckBoxList>
    </asp:Panel>
    <asp:Panel ID="Panel11" runat="server" BackColor="Yellow" Height="125px" 
        Width="694px" Visible="False">
        <asp:CheckBoxList ID="CheckBoxList11" runat="server" 
    Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
        </asp:CheckBoxList>
    </asp:Panel>
    <asp:Panel ID="Panel12" runat="server" BackColor="Blue" Height="125px" 
        Width="694px" Visible="False">
         <asp:CheckBoxList ID="CheckBoxList12" runat="server" 
    Height="97px" Width="200px">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
            <asp:ListItem></asp:ListItem>
        </asp:CheckBoxList>
    </asp:Panel>    
    </ContentTemplate>
    </asp:UpdatePanel>
    
    </div>
    <p class="style26">Choix des périodes</p>
    <p class="style26">&nbsp;</p>
    <p class="style26">&nbsp;</p>

    </form>
</body>
</html>


GestionAgenda.cs :
using System;
using System.Windows.Forms;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class GestionAgenda : System.Web.UI.Page
{

protected void  Bn01_Click(object sender, EventArgs e)
{
    Panel1.Visible = false;
    Panel2.Visible = false;
    Panel3.Visible = false;
    Panel4.Visible = false;
    Panel5.Visible = false;
    Panel6.Visible = false;
    Panel7.Visible = false;
    Panel8.Visible = false;
    Panel9.Visible = false;
    Panel10.Visible = false;
    Panel11.Visible = false;
    Panel12.Visible = false;


    string chaine_numbtn = ((System.Web.UI.WebControls.Button)sender).ID.Substring(2, 2);
    int numbtn = Convert.ToInt32(chaine_numbtn);
    System.Web.UI.WebControls.Panel LePanel = (System.Web.UI.WebControls.Panel)FindControl("Panel" + numbtn.ToString());
    LePanel.Visible = true;
}
}

AnswerRe: Ajax and ASP.NET Pin
mr_muskurahat18-Feb-09 0:40
mr_muskurahat18-Feb-09 0:40 
GeneralRe: Ajax and ASP.NET Pin
asenaici18-Feb-09 1:14
asenaici18-Feb-09 1:14 
AnswerRe: Ajax and ASP.NET Pin
keyur satyadev18-Feb-09 0:44
keyur satyadev18-Feb-09 0:44 
GeneralRe: Ajax and ASP.NET Pin
asenaici18-Feb-09 1:12
asenaici18-Feb-09 1:12 
GeneralRe: Ajax and ASP.NET Pin
mr_muskurahat18-Feb-09 1:28
mr_muskurahat18-Feb-09 1:28 
GeneralRe: Ajax and ASP.NET Pin
asenaici18-Feb-09 2:08
asenaici18-Feb-09 2:08 
GeneralRe: Ajax and ASP.NET Pin
keyur satyadev18-Feb-09 1:32
keyur satyadev18-Feb-09 1:32 
QuestionExport To Excel kill Session Values Pin
ArunVijay18-Feb-09 0:05
ArunVijay18-Feb-09 0:05 
QuestionReg: Need help with iTextsharp and PDF Signing Pin
DOTNETDK17-Feb-09 23:54
DOTNETDK17-Feb-09 23:54 
QuestionRequireSSL Pin
harleydk17-Feb-09 23:18
harleydk17-Feb-09 23:18 
QuestionReading and Writing File using Class Library Pin
Anurag Gandhi17-Feb-09 22:53
professionalAnurag Gandhi17-Feb-09 22:53 
AnswerRe: Reading and Writing File using Class Library Pin
SeMartens17-Feb-09 23:05
SeMartens17-Feb-09 23:05 
GeneralRe: Reading and Writing File using Class Library Pin
Abhijit Jana17-Feb-09 23:21
professionalAbhijit Jana17-Feb-09 23:21 
GeneralRe: Reading and Writing File using Class Library Pin
Anurag Gandhi17-Feb-09 23:59
professionalAnurag Gandhi17-Feb-09 23:59 
GeneralRe: Reading and Writing File using Class Library Pin
Ashfield18-Feb-09 1:40
Ashfield18-Feb-09 1:40 
GeneralRe: Reading and Writing File using Class Library Pin
Anurag Gandhi18-Feb-09 1:47
professionalAnurag Gandhi18-Feb-09 1:47 
GeneralRe: Reading and Writing File using Class Library Pin
Ashfield18-Feb-09 8:43
Ashfield18-Feb-09 8:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.