vb.net - My label's text isn't changing on page_load asp.net -


i'm starting out looking @ asp.net. i've got code works in vb, not in asp.

i've put in page_load:

dim db_con sqlconnection, ssql string, db_cmd sqlcommand, rdr sqldatareader     db_con = new sqlconnection("data source=myserver;initial catalog=processes;user id=usrid;password=mypwd;")     db_cmd = new sqlcommand()     ssql = "select * command_table_links command_id = 1"     db_con.open()     db_cmd.connection = db_con     db_cmd.commandtext = ssql     db_cmd.commandtype = data.commandtype.text      rdr = db_cmd.executereader()     rdr.read()     if rdr.hasrows         lbltest.text = "it connected"     else         lbltest.text = "no connection"     end if      rdr.close()     db_con.close() 

any idea why wouldn't work in asp.net? issue label blank. in vb.net form shown, lable says "it connected".

it must be:
protected sub page_load(byval sender object, byval e system.eventargs) handles me.load


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -