RE: linqdatasource runtime connection string

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



oops, that doesn't work.

"Chuck P" wrote:

I ended up searching on the Autogenerated connection name and changing it in
the designer.cs and the .dbml file.

Looks like that works, I could still drop tables and stuff from
ServerExplorer and have it work.


""Wen Yuan Wang [MSFT]"" wrote:

Hello Chuck,
Thanks for your reply.

By default, LinqDataSource create data context by using default
constructor. If you want to use specific connection, I think you can create
data context object by yourself, and assign the object to the
ObjectInstance property in ContextCreating event.

Please refer to the following document. There is a simple about how to
specify connect string for LinqDataSource by yourself.
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.linqdatas
ource.contextcreating.aspx
[LinqDataSource..::.ContextCreating Event]

Hope this helps. Please feel free to let me know if you have any more
concern. We are glad to assist you.
Wen Yuan
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


.



Relevant Pages

  • RE: linqdatasource runtime connection string
    ... LinqDataSource create data context by using default ... Microsoft Online Community Support ... You can send feedback directly to my manager at: ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: linqdatasource runtime connection string
    ... I ended up searching on the Autogenerated connection name and changing it in ... LinqDataSource create data context by using default ... Microsoft Online Community Support ... You can send feedback directly to my manager at: ...
    (microsoft.public.dotnet.framework.adonet)