Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Resettare form dopo un insert

    Esiste un modo per azzerare i campi del form dopo aver eseguito un insert. In particolare vorrei che le dropdownlist vengano posizionate sul primo valore e che i campi input vengano azzerati per un nuovo inserimento.

    Grazie
    C'è sempre una soluzione al tuo problema!
    Nel frattempo rilassati.
    http://www.salentu.com

  2. #2
    al codice del tuo submit aggiungi come ulima parte:

    Dim myForm As Control = Page.FindControl("nomeform")
    Dim myctl As Control
    For Each myctl In myForm.Controls
    If myctl.GetType Is GetType(TextBox) Then
    CType(myctl, TextBox).Enabled = True
    CType(myctl, TextBox).Text = ""
    End If
    If myctl.GetType Is GetType(DropDownList) Then
    CType(myctl, DropDownList).Enabled = True
    CType(myctl, DropDownList).SelectedIndex = 1
    End If
    Next myctl

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.