custom control and sql connection

M

Mircea S.

hi all,

i've created a custom web control in asp.net (vb) to implement basic
login/profile functionality. i use this control in a aspx page, passing
through properties all the settings i need, including the connection string
for sql database. all these properties values are stored in the viewstate
bag.

the control is simple, just some write-only properties and the
CreateChildControls method where i add the child controls programmatically.
the sql connection i use it here, because i fetch some info from the
database.

the problem i'm facing is that when posting back the page, sometimes i get
the error "SQL Server does not exist or access denied" even if the sql
server is up'n'running. after this error, if i reload the page i still get
the same error. funny is that it gets running again after i recompile the
solution.

does anybody knows what could it be?

tia,
mircea
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top