Guest User

Untitled

a guest
Jul 17th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. //Using connection string in code
  2. string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["blah"].ConnectionString;
  3.  
  4.  
  5. //Declaring the connection string in a config
  6. <connectionStrings>
  7. <add name="blah" connectionString="Server=.\sqlexpress;Database=mydb; Integrated Security=SSPI" providerName="System.Data.SqlClient"/>
  8. </connectionStrings>
  9.  
  10. //Server resolving a Url
  11. //dont forget runat="server"
  12. <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/login.aspx">Login</asp:HyperLink>
Add Comment
Please, Sign In to add comment