|
Check your web.config file, if it includes the compilation.debug option and it's set to true :
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
</configuration>
Also, see if the Suppress JIT optimization on module load option is not unchecked. (It's found under Options->Debugging->General).
What exactly happens when you add a breakpoint and run your app?
2A
|
|
|
|
|
Until two weeks ago I could not even step through the code. I changed a debugging option to just be able to see my code.
I will check inot what you suggested.
basically what happens are the variables are optimized and that is why I can not see their values.
In all the project files, I have the 'optimized' option unchecked.
|
|
|
|
|
I am asking this question since I would like to know what is the best method of coding in a C # 2010 web form page that I just wrote. I read somewhere that everytime you need a datacontext object, you should
create it. There was no reference also to removing the datacontext object.
Thus on the current web form page that I am using that connects to a sql server 2008 r2 database, I am doing the following:
1. I never remove the AttDataContext from memory.
2. On the same web page, I am referring to the same linq to sql *.dbml file. However depending upon what I user clicks on, I have the following 3 datacontext objects:
a. AttDataContext,
b. Att2DataContext,
c. Att3DataContext.
Can you tell me if the above if a good idea or not? If not, can you tell me how I should use the same data context object on the same web form page?
|
|
|
|
|
Implement the using pattern when invoking these objects:
using (AttDataContext db = new AttDataContext())
{
}
This construct will close and dispose for you. You should not maintain an active connection where it is not required.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
Hello.
Is it possible to achive this:
(all is inside web.config)
<configuration>
<appSettings>
<add key="strSQLServer" value="srvproduction\SQL2008Express">
</appSettings>
<connectionStrings>
<add name="dbConn" connectionString="Data Source=" + key["strSQLServer"] + ";MultipleActiveResultSets=True;Initial Catalog=db1;Persist Security Info=True;Connection Timeout=600;User ID=sa;Password=***" providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
Like I said at the begining: all is inside web.config
??
|
|
|
|
|
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?
|
|
|
|