Progress Bar en ASP.NET C# ?

Résolu
kiraqi Messages postés 33 Date d'inscription samedi 8 mars 2008 Statut Membre Dernière intervention 23 janvier 2012 - 16 oct. 2008 à 17:21
nhervagault Messages postés 6063 Date d'inscription dimanche 13 avril 2003 Statut Membre Dernière intervention 15 juillet 2011 - 17 oct. 2008 à 19:10
Salut,
pls , comment je peux réussir une progress bar en cliquant sur un bouton (ASP.NET , C#) ???????
A voir également:

4 réponses

nhervagault Messages postés 6063 Date d'inscription dimanche 13 avril 2003 Statut Membre Dernière intervention 15 juillet 2011 37
16 oct. 2008 à 19:20
Salut,

Regardes du coté des updateprogress et updatepanel de ajax extension

http://www.asp.net/AJAX/Documentation/Live/overview/UpdateProgressOverview.aspx

Sinon une recherche sur internet de donneras d'autre exemple.
Avec Ajax ta demande est surement réalisable
3
kiraqi Messages postés 33 Date d'inscription samedi 8 mars 2008 Statut Membre Dernière intervention 23 janvier 2012
17 oct. 2008 à 12:00
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="ProgId" content="Word.Document" />
<meta name="Generator" content="Microsoft Word 11" />
<meta name="Originator" content="Microsoft Word 11" />
<link rel="File-List" href="file:///D:%5CDOCUME%7E1%5Ca%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml" />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:HyphenationZone>21</w:HyphenationZone>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
pre
{margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Tableau Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->

Bonjour,




Merci
pour ta réponse ;






 






Après
avoir téléchargé AJAXExtensions depuis :






http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en








 







 

j’ai
essayé le premier exemple de UpdateProgress mais ça ne m’affiche pas
progressing… au moment de l’appui du button ? (il exécute le sleeping puis affiche la date; au moment du sleeping il n'affiche pas Progressing ... ) ?






http://www.asp.net/AJAX/Documentation/Live/tutorials/IntroductionUpdateProgress.aspx







(J’ai
attribué à la propriété de UpdateProgress1 qui est AssociatedUpdatePanel la
valeur UpdatePanel1)





J’ai
ajouté aussi dans la page aspx.cs le code :






 






[PersistChildrenAttribute(false)]





[ParseChildrenAttribute(true)]





[DefaultPropertyAttribute("UpdatePanel1")]





[DesignerAttribute("System.Web.UI.Design.UpdateProgressDesigner,
System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35")]





[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand,
Level = AspNetHostingPermissionLevel.Minimal)]





[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand,
Level = AspNetHostingPermissionLevel.Minimal)]






 

Avant le début de ma classe , mais le compilateur m’affiche
une erreur à la ligne :





[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]






 






Qui
est :
CS0103: Le nom 'SecurityAction'
n'existe pas dans le contexte actuel





Qu’est ce que je dois faire ?









 







 






Sur
Internet :





L’exemple
qui m’a paru simple et claire du site :






http://www.aspnettutorials.com/tutorials/themes/progress-bar-csharp.aspx







ne
marche pas (même problème : en appuyant sur le button : le processus
reste un certain tps ; il n’affiche pas la progress bar passé puis à la
fin affiche 100% passé ) mais pourquoi, estce que je dois télécharger autre
choses à mon Visual Studio 2005 ?
0
kiraqi Messages postés 33 Date d'inscription samedi 8 mars 2008 Statut Membre Dernière intervention 23 janvier 2012
17 oct. 2008 à 13:26
C'est bon pour le problème :
CS0103: Le nom 'SecurityAction' n'existe pas dans le contexte actuel

il faut ajouté la biblioyhèque : using System.Security.Permissions;

par contre le compilateur pointe sur la ligne suivant et n'accepte pas l'héritage de Control et de IScriptControl:
Erreur:
Message d'erreur du compilateur: ASPNET:
Assurez-vous que la classe définie dans ce fichier de code correspond à
l'attribut 'inherits' et qu'elle étend la classe de base appropriée
(exemple : Page ou UserControl).

public partial class progressbar_16oct08 : Control,IScriptControl

qu'est ce que je dois faire?
0
nhervagault Messages postés 6063 Date d'inscription dimanche 13 avril 2003 Statut Membre Dernière intervention 15 juillet 2011 37
17 oct. 2008 à 19:10
Salut,

Il y a un truc que je ne comprends pas.

Tu ne devrais pas avoir à jouer avec les attributs du control UpdateProgress

Regardes
http://www.codeproject.com/KB/ajax/UpdateProgress.aspx
0
Rejoignez-nous