|
Marius DUMITRU wrote: Is it possible to achive this:
(all is inside web.config)
connectionString="Data Source=" + key["strSQLServer"] + ";MultipleActiveResultSets=True;
No. Not possible. Web.Config is application's configuration file and not a programming logic in itself. You can maximum write in web.config file but it will not evaluate things in it by itself. It's a simple config file.
Last but not the least, what you ask is not needed - I don't think there is any reason to have/do it like this.
Config file is the way to provide defined connection string. If you want multiple datasource, then just define multiple connection strings.
Refer: MSDN: connectionStrings Element (ASP.NET Settings Schema)[^]
|
|
|
|
|
Why not just do this ?
<configuration>
<connectionStrings>
<add name="dbConn" connectionString="Data Source=srvproduction\SQL2008Express;MultipleActiveResultSets=True;Initial Catalog=db1;Persist Security Info=True;Connection Timeout=600;User ID=sa;Password=***" providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
As Sandeep said, you cannot have programming logic w/in your web.config file.
Cheers,
Karthik
|
|
|
|
|
When I am debugging a C# 2010 web application, I am getting the error, "A first chance exception of type 'System.Web.HttpParseException' occurred in System.Web.dll" sometimes.
I am wondering if you can suggest in what situations this error could be occuring and/or possibly help me to determine when this type of error is occuring?
The only thing I think that can be causing this error is when a user finishes working on my new pages on the company website. My new web pages run in a series of 5 pages. When they have finsished entering data for one customer i redirect the user to the first of the 5 pages. at any point the user can click the 'logout' button that is at the top of all the master pages. Could this be an issue?
|
|
|
|
|
When I am stepping through code for a C# 2010 web form application,there are times when I can see the values of variables and there are times where I can not see the value of variables. I am wondering what is causing this and how I make make certain I can see the values of the variables.
Here are some of the messages that I see and I am wondering if these error messages are related or not? What do you suggest I do to resolve the issues with the error messages?
fhe name 'filteredList' does not exist in the current context results Cannot obtain value of local or argument 'results' as it is not available at this instruction pointer, possibly because it has been optimized away. Step into: Stepping over method without symbols 'System.Web.UI.WebControls.ListControl.SelectedValue.get' Step into: Stepping over method without symbols 'string.Concat' Step into: Stepping over method without symbols 'System.Web.HttpApplication.ExecuteStep' Step into: Stepping over method without symbols 'System.Web.HttpApplication.BeginProcessRequestNotification'
Note: when a message says a value is not available, I am in the method at the time and I should be able to see value.
|
|
|
|
|
|
I did know what the following,"It might be that your project or solution is not in DEBUG mode."
Thus can you tell me how to make certain my proejct and solution are both in debug mode? I do not know how to do this.
|
|
|
|
|
Try: Right click solution -> Properties -> Configuration properties.
|
|
|
|
|
If you visit bbc or cnn or any other news page you will see the news article page with rich text and images.
What is the best to do this in ASP.net if I want to create an entry page for users to create such pages for them self? Will database be a good idea?
|
|
|
|
|
jrahma wrote: What is the best to do this in ASP.net
Silverlight was introduced for rich applications in ASP.NET earlier but HTML5 with CSS3 looks the right way currently. Try HTML5 for rich UI.
You can start reading about it from here: http://www.w3schools.com/html5/default.asp[^]
jrahma wrote: Will database be a good idea?
No idea where from database came into picture here!
|
|
|
|
|
I'm sure the OP is asking if a database would be a good way to store the news articles, pictures, etc.
|
|
|
|
|
hi,
text,images's path into database,images into files of server
|
|
|
|
|
what is the beginner coding for creating web designing.
|
|
|
|
|
|
|
you must study html/css/javascript/asp.net/sqlserver etc
|
|
|
|
|
i have login page conatiend two button login and other for regsitration my login page i applyed validation textbox1 and textbox2 as i left it blank click on Registeration button it will not allow to move regsteration page bcoz all this validation.
tell me how can i group text box with login button
|
|
|
|
|
Just do something like:
<tr>
<td style="width: 100px"> First Name</td>
<td style="width: 100px">
<asp:TextBox ID="txtFirstName" runat="server" ValidationGroup="Name_Group"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtFirstName" ErrorMessage="Enter First Name" ValidationGroup="Name_Group" Width="149px"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td style="width: 100px">Last Name</td>
<td style="width: 100px">
<asp:TextBox ID="txtLastName" runat="server" ValidationGroup="Name_group"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtLastName" ErrorMessage="Enter Last Name" ValidationGroup="Name_Group"Width="152px"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td style="width: 100px"></td>
<td style="width: 100px">
<asp:Button ID="btnRegister" runat="server" Text="Register" ValidationGroup="Register_Group" />
</td>
</tr>
ValidationGroup="Register_Group" takes care of your scenario.
Following illustrates on how you can group them:
Validation group in ASP.Net 2.0[^]
MSDN: Specifying Validation Groups[^]
|
|
|
|
|
hey thankz for reply can you help me out for caching asp.net i m beginners
|
|
|
|
|
|
When I am debugging a C# 2010 web form application that is running against iis7 from my visual studio.net 2010 professional ide, I get messages like the following:
this Cannot obtain value of local or argument '<this>' as it is not available at this instruction pointer, possibly because it has been optimized away. Damport.DImportDataContext fileOrServerOrConnection Cannot obtain value of local or argument 'fileOrServerOrConnection' as it is not available at this instruction pointer, possibly because it has been optimized away. string mapping Cannot obtain value of local or argument 'mapping' as it is not available at this instruction pointer, possibly because it has been optimized away. System.Data.Linq.Mapping.MappingSource
This kind of error message occurs in different sections of the code. Some sections I do not have this problem.
Basically when this kind of error message occurs, I can not see the value in different variables. Thus can you tell me what I can do so that I can see the value of the variables when this error occurs?
|
|
|
|
|
|
I have a C# 2010 web form application that uses linq to sql connections. I am having problems with the visual studio.net 2010 ide opening up very slowly.
The problem looks like I need to change part of the name for a dbml file. Here are the names I am working with;
1. testapp.dbml,
2. testapp.dbml.layout, and
3. testapp1.designer.cs.
I know the problem is the name called testapp1.designer.cs.
I do not know how to change the name of this element. The visual studio.net ide will not let me change
the name from testapp1.designer.cs to testapp.designer.cs.
Thus can you tell me how to change the name?
If you think something else is causing the problem, can you let me know what it is and how to solve the problem?
|
|
|
|
|
You need to apply the rename to the parent file testapp1.cs .
|
|
|
|
|
I changed the higher level file name to:
testapp1.
Then the lower level file name became the following:
testapp11.
Do you have other suggestions?
|
|
|
|
|
Strange, there must be some other naming system in web applications; I have never seen this before. Maybe you should create a new project and see if it follows the same pattern. I also forget why you need to change this name, perhaps you could clarify what the problem is.
|
|
|
|