vb.net 2010 - Securing records when it comes to editing -
assuming there's value in of textfields , comboboxes. want when click edit button, there pop window require users password before enabling text fields.. possible? if yes? what's code/syntax. in advance!
yes, possible, here used mike
username , mike124
password, here code :
'here click event when user clicks on edit button private sub editbut_click(sender object, e eventargs) handles editbut.click recheckusername: dim usernameinput string = inputbox("please enter username :") if usernameinput = "mike" , usernameinput <> "" reheckpassword: dim passwordinput string = inputbox("please enter password :") if passwordinput = "mike124" , passwordinput <> "" 'enable fields here because username , password correct else 'the password wrong msgbox("please check password , try again") goto reheckpassword end if else 'the username wrong msgbox("please check username , try again") goto recheckusername end if end sub
if want way store username , password, can use my.settings.username
, my.settings.password
, but first need define them in properties of solution, go project
tab in toolbar
, click on properties
, go settings
tab , set username
, password
variables.
hope helped need :)
Comments
Post a Comment