Click here to Skip to main content
15,886,578 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi,

I have created master page and sub pages based on master page..

I am able to connect to sql server by default.aspx or say first.aspx page created using Master page.

Is it possible to have sqlconnection objects in Master page and use it in default.aspx pages or other sub pages to connect to sql server. I have tried this but not working..

It is working only if I put connection objects in individual pages..

hope I am clear with statement of my query...

Thnx
Posted
Comments
rupeshsha8452 30-Jun-13 8:00am    
use layer based architecture and create connection class and use as object.

1 solution

you can give connection string in Web.config and you can use that connection in pages.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900