asp.net - The thread was interrupted -


i using code update database new values. return message the thread interrupted. mean? wrong code?

 dim connstr string = system.configuration.configurationmanager.connectionstrings("deskriptivaconnectionstring").connectionstring.tostring()     dim txtname object = directcast(formview1.findcontrol("txtname"), textbox)     dim txtlastname object = directcast(formview1.findcontrol("txtlastname"), textbox)     dim txtinfo object = directcast(formview1.findcontrol("txtinfo"), textbox)     dim txtcity object = directcast(formview1.findcontrol("txtcity"), textbox)     dim txtprize textbox = directcast(formview1.findcontrol("txtprize"), textbox)     dim txtphone textbox = directcast(formview1.findcontrol("txtphone"), textbox)     dim txtmail textbox = directcast(formview1.findcontrol("txtmail"), textbox)       try         using conn new sqlconnection(connstr)             dim cmd sqlcommand = conn.createcommand()             cmd.commandtext = "update profiles set @name = name, @lastname = lastname, @info = info, @city = city, @prize = prize, @phone = phone, @mail = mail (username = @username)"             cmd.parameters.add("@name", system.data.sqldbtype.nvarchar).value = txtname.text             cmd.parameters.add("@lastname", system.data.sqldbtype.nvarchar).value = txtlastname.text             cmd.parameters.add("@info", system.data.sqldbtype.ntext).value = makelink(htmlremoval.striptagschararray(txtinfo.text))             cmd.parameters.add("@city", system.data.sqldbtype.nvarchar).value = txtcity.text             cmd.parameters.add("@prize", system.data.sqldbtype.nvarchar).value = txtprize.text             cmd.parameters.add("@phone", system.data.sqldbtype.nvarchar).value = txtphone.text             cmd.parameters.add("@mail", system.data.sqldbtype.nvarchar).value = txtmail.text             cmd.parameters.add("@username", system.data.sqldbtype.nvarchar).value = context.user.identity.name              conn.open()             cmd.executenonquery()             conn.close()             response.redirect(resolveclienturl("~/profil/"))         end using      catch ex exception         msgbox(ex.message)     end try 

use response.redirect(resolveclienturl("~/profil/"), false) context.applicationinstance.completerequest(); instead of response.redirect(resolveclienturl("~/profil/"))

check correct use of system.web.httpresponse.redirect blog post more information

and sql parameters @ symbol in wrong place. change below

update profiles set name = @name, lastname = @lastname, info = @info, city = @city, prize = @prize, phone = @phone, mail = @mail (username = @username)


Comments