Se connecter avec
S'enregistrer | Connectez-vous

[ASP.NET][C#] user control

Dernière réponse : dans Programmation

Salut a tous

j'ai cree un userControl qui hérite de TextBox mais malheureusement il ne fonctionne pas le code behind de mon UserControl:

Code:
  1. public partial class textBoxIpso : System.Web.UI.WebControls.TextBox
  2. {
  3. private string _myChampDataBase;
  4.  
  5. private string _myDataBase;
  6.  
  7. protected void Page_Load(object sender, EventArgs e)
  8. {
  9.  
  10. }
  11.  
  12. public string ChampDataBase
  13. {
  14. get
  15. {
  16. return _myChampDataBase;
  17. }
  18. set
  19. {
  20. this._myChampDataBase = value;
  21. }
  22. }
  23.  
  24. public string DataBase
  25. {
  26. get
  27. {
  28. return _myDataBase;
  29. }
  30. set
  31. {
  32. _myDataBase = value;
  33. }
  34.  
  35. }
  36.  
  37.  
  38. }




et ds ma page Web

Code:

  1. <.....>
  2. <%@ register tagname="TextBox" tagprefix="user" src="textBoxIpso.ascx" %>
  3.  
  4. <.....>
  5. <body>
  6. <user:texBox Text="info" Id="ctrl1" DataBase="db1" />
  7. </body>


je veux savoir pourquoi? Rolling Eyes

Autres pages sur : asp net user control

Lassé par la pub ? Créez un compte
Lassé par la pub ? Créez un compte