Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 3rd, 2005, 08:51 AM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default User Control Db Connection

I'm working on an online system.In this system I#, using SQL Server 2000 as a database server.I want to use db connection in ascx file and access it from aspx file.Please tell me how i ca access it. i m facing problem again and again.if any body knows about it then let me know.


Muhammad Farrukh Munir
 
Old February 11th, 2005, 03:42 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

You have to register that ASCX control in aspx page using Register Directive.
<@Register tagname="ConnectionString" tagprefix="Connection" src="Connnection.ascx"/>

and u can declare that as an regular control in ur page
<Connection:ConnectionString id="strConn" runat="server"/>

and in codebehind access the method or whatever property you had set to open the connection.

If you had done all this,tell me what is the error?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Windows User control in Web User Control agarwalvidhu C# 0 March 30th, 2006 01:17 AM
Help! Custom Server Control using User Control diehard ASP.NET 1.0 and 1.1 Professional 2 January 4th, 2006 12:33 PM
db connection dfeuerborn VB Databases Basics 1 August 19th, 2005 02:08 PM
db connection dfeuerborn Excel VBA 1 August 19th, 2005 02:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.