Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
I have created a custom master page for a SharePoint 2013 environment, I then tied it to a sql db and am looking to return the results from a sql query against that db into 2 fields in my aspx page. How can i go about completing this portion? Also, if possible can i get the query to automatically run on pageload so that no buttons are necessary to retrieve the data?
Posted
Comments
Aditya Chauhan 29-May-15 3:50am    
Please Clarifies your question...if have some code you are using, show here...
Member 10772777 31-May-15 22:50pm    
I have a basic aspx page in SharePoint that I would like to pull data from a sql db . I have the query written but am having a hard time findin examples that show both together
ZurdoDev 29-May-15 9:38am    
Yes. Use the SqlConnection and SqlCommand and SqlDataReader objects to query the db and set the values in your controls.
Member 10772777 31-May-15 22:49pm    
Thank you, I found multiple that show how to add to a basic page but am unable to find any samples that are with SharePoint aspx pages. Do you have any sites or examples that you could provide?
ZurdoDev 1-Jun-15 7:37am    
I don't, I haven't done SharePoint development in many years. But I know there should be tons of examples of sharepoint development.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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