I have a data-source connected to a stored proc that will return the one record that applies to a specific page, and for another similar situation (populating heading information), I wrapped a repeater around the headings html, and used <%$ Eval() %> binding expressions to get the data into the headings. However, I now have another issue...
I wonder is there any way we can create regions in aspx page as we create it in our cs pages.
...
I am relatively new to MVC, so this is likely a novice question.
I am trying to understand the best practices for how to maintain clear separation of concerns in a few scenarios that don't appear straightfoward.
There are two scenarios I am looking at right now. Imagine a very basic app that lets users view and edit online profiles fo...
I have multiple projects containing multiple WCF service references.
My WCF services are in a state of flux so I frequently have to go around and update all of my service references.
Is there a way to achieve this as a single action?
...
Visual Studio will show errors in an AS?X or HTML file in the Error List window when you have that file open. However once you close the file the error(s) are removed from the Error List.
Is it possible to validate all AS?X and HTML files in one action (ideally as part of building) and show all errors at once?
...
Hi,
I have a treeview in my masterpage. When a contentpage is loaded i want to save the treeview state (which nodes are collapsed/expanded). I store the nodes in an ArrayList. Code:
private void SaveTreeviewState(TreeNodeCollection nodes)
{
foreach (TreeNode t in nodes)
{
// Store expandable state in ArrayList (true or...
I am starting out with unit testing, I have a method that uses the web.config for a connection string.
I was hoping to be able to use
[DeploymentItem("web.config")]
to get the web config file, this still leaves me with null reference exceptions (that'd be what I write my next test for).
How do I use the config file included with the...
I've a page that has a series of web controls. One of these is a textbox with AutoPostBack turned off.
The way the page operates is that a button is clicked to save the form data. This button sits outside of the updatepanel.
So when I hit the save button the partial postback happens for the dropdownlist and after this postback has comp...
I know this may be a noob question, but it's bugging the heck out of me.
Let's say I have a user control that I reference in my .aspx page:
<uc:somecontrol runat="server" id="uc1" property1="red" />
how do I make it so when in VS05 the intellisense will show options like "red", "green", "blue" for property1? Similar to how when you w...
I got in a session a class with type-safe variable; int, string, dataset, etc
is there a way to find out how much memory is used by that session?
thanks
...
When accessing values from an SqlDataReader is there a performance difference between these two:
string key = reader.GetString("Key");
or
string key = reader["Key"].ToString();
In this code sample:
string key;
using (SqlDataReader reader = cmd.ExecuteReader())
{
while (reader.Read())
{
key = reader.GetString("Key"...
Hi all,
I am rather confused I have got a createuser wizard control that I use with my custom user classes and role classes.
I have a step so that the admin user can create new users and assign them their roles. The OnActivate method is firing but the OnDeactivate is not. I have put break points on both methods and confirmed that it ...
Our SSO login process uses Forms Authentication against a custom user store in SQL Server.
One of our new security requirements is to only allow an account to have one active session at a time. So any time a user logs in, we will check to see if the login credentials are already active, and preferably prevent the new user from logging i...
I have an IIS7 web application which primarily serves web service requests. As part of our solution we have two web servers and a load balancer, and the load balancer requests a page from each of its load balanced boxes periodically. The page the load balancer loads is named "Health.aspx", it does not have a code behind, and the entire...
Question 1 -
I'm wanting to give the user the ability to reset their password only without an email and generated password. The user verifies themselves against our internal database by a custom form a wrote. Then, I'd like to prompt them for username and security q&a. I don't know how to do the security QA so i decided to customize the...
I have a another ASP.Net web project that I am working and I have approached error handling from different angles. I was just wondering if any seasoned and experienced developers out there had any recommendations.
Bonus points for discussions on a nice logging framework for ASP.net:)
...
I found out how to generate an image in code-behind based on some input from a webform, great. now i want to put that image back onto the form after the postback. All the samples i found use the Response to send the image back out to the browser with a stream.
Is there anyway to specify that the image generated in the code behind, be t...
The title pretty much states the question, what do you think is hte best way? Just get HTML from the designers (graphic artists etc.), then go in and start adding the "runat=server", etc.? Are there any other approaches that work well?
...
For my asp.net website with forms authentication, I will use Windows integrated security to access a sql database. I will give DB permissions to the ASPNET or NETWORK SERVICE. Under what circumstances would I use SQL authentication instead?
...
I have a gridview inside of an updatepanel and would like to allow the user to select a row which would generate a call to a class that outputs a stream back to the client. It looks like I can't do this because the grid is inside of an update panel. Any ideas?
C#
protected void gvResults_SelectedIndexChanged(object sender, EventA...