J'ai code simple comme ça ... comme suivre ...Appel côté client par côté serveur Thru Bouton de commande
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="AlinmaWebApp._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>Untitled Page</title>
<style type="text/css">
#formHt
{
height: 284px;
}
.DivStyle
{
height :250px;
background-color :Green ;
display : block;
}
</style>
<script language="javascript" type ="text/javascript" >
function TryClose() {
document.getElementById("DivBah").style.height = '1px';
document.getElementById("DivBah").style.display = 'none';
return;
}
</script>
</head>
<body onload="TakeIT() return;" >
<form id="formHt" runat="server">
<div id="DivBah" class="DivStyle" >
Just Try if this part will Collapse or not</div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="TryClose()"/>
</form>
</body>
</html>
Cela m'a donné un message d'erreur comme => « TryClose » ne fait pas partie de " default _._ ASPX " Quelle est l'erreur possible sur ce type de codage? Depuis que j'utilise toujours ce type dans le programme ASP simple avant.