asp.net

How do I load data to a list from a dataReader?

Hi all, I am tryin to add data to my list object. For a string, I just say, this.name = myDaraReader["test"]toTring(); How do I go about doing that for a list? ...

Find control on aspx from ascx

I'm trying to find a label on an aspx page from a user control (ascx) on said aspx page. Obviously Page.FindControl("lablel1") is not working. Do I need to add in ClientID somewhere? Thanks. ...

Update Panel Animation isn't showing up

I can't seem to get an update panel with an animated GIF to pop-up when following a simple "recipe" in a popular blog. We're using ASP.NET 3.5 with VB codebehind pages (a little bit of AJAX sprinkled in but nothing complex). The users are presented with a "selection page" full of the data they're allowed to edit. The page has some che...

Possible to insert a new row in a silverlight datagrid from the UI? or only by modifying the datasource?

In WinForms it was possible to add a new row to the grid by using the last row in the grid, some grid controls provide such functionality through the Insert button. Is this possible with the datagrid included with silverlight? My only available option is providing input controls to the user with a insert button and manually adding a ne...

Is Anyone Still Using Access For Web Development Anymore?

Yes, I know, you are all cringing in horror. Back in the day I got my start writing internal apps with classic ASP and MS Access. I'm writing a small marketing app, and I recently got denied access to our SQL Server. So I was looking for alternatives. There will be very little data input, mostly just reading static data. I've heard ...

Posting xml from classic asp to asp.net

I apologize if this has been asked before. I searched and didn't find anything that matched my situation. Also bear in mind I am fairly new to asp/asp.net development. My current project is a relatively simple e-commerce site. The customer will connect to the site, select products, input shipping and billing information, payment info...

When are ASP.NET Expression Builders most useful?

I saw an example of using Expression Builders, and creating your own Custom Expression Builder Classes here: http://aspnet.4guysfromrolla.com/articles/022509-1.aspx However, I fail to see the value in using this approach. It doesn't seem much easier than programmatically setting values in your code behind. As far as I can tell, the o...

Clearing a asp.net datagrid in ASPX page

I have a custom ASPX search page for a CRM 4.0 solution I am working on. I want to be able to clear out the asp.net datagrid I have on the search page. Right now if a person does a search it returns the results in the datagrid but if they do another search and there are no results for the new search the old search results are still in ...

ASP.NET/IIS: Windows Authentication, setting max attempts and redirecting

We have an internal web app running on IIS6 and we use the integrated windows authentication for domain users to login to the app before they can use it. What we would like to do is redirect the user to an error page if they fail to login to the domain 3 times. Where should i be looking to configure this? My first thought was in IIS, ...

Can i rewrite URL in MSVS?

I am using MSVS 2008, C#, ASP.NET project. Right now i can serve any pages i want under http://localhost:3288/ExistingPageInProject.aspx In MSVS how do i map http://localhost:3288/u/SOME_USER_NAME/media/TITLE-0123 to point to a file/page i have. Such as /u/ExamplePage?name=SOME_USER_NAME&title=TITLE-0123 NOTE: 0123 is the mediaId so th...

Combining Multiple outputs in single view in asp.net MVC

I am looking to use asp.net MVC for new project. I looked at different examples at asp.net and over web. I still didn't get answer to , what is the best way to combine output of different models into a single view. For example my home page will contain catgories, locations, snapshots of recent posts. These will come from three different ...

detect if an ASCX/ASPX is running in SharePoint?

We have a set of code that is going to be used in both standalone ASP.NET and SharePoint. I'm wondering if there's any legitimate way to write conditional code in the CS file to detect whether SharePoint is present? It needs to be able to run in or before OnPreInit, because based on this decision we'll be switching the MasterPageFile a...

ASP.NET MVC DefaultModelBinder with nested lists

I have a View with a table representing an employee's timesheet. Days across the top, projects down the side, with each day/project intersection containing two values for regular hours and overtime. The (simplified) class definitions for the page model are: public class TimesheetFormModel { public List<Project> Projects; // oth...

How can I pass information to an iframe via Post in ASP.NET?

Hi, I would like to pass information to an iframe via post. (Could be jquery or javascript that executes the post, it doesn't really matter). The information cannot be sent via querystring as I do not have access to change the way the page brought in by the iframe is. This data will determine the layout of the content in the iframe so...

Do Compiled Queries Cache?

Much of my application uses complied queries to retrieve data. In these queries I'll often refer to the current user. I'm noticing that if a user, B, logs in after another user, A, then user B will see user A's informaiton. I have querries much like this all through out the application public static Func<DataContext, MyRecord> CurrentU...

Can TransactionScope rollback be used with Selenium or Watin?

I am trying to do some automated web testing of my ASP.NET application. I was hoping to use the AutoRollback attribute from Xunit.net extensions to undo any database changes that were made during the test. AutoRollback uses TransactionScope to start a transaction before the test and roll it back afterwards. When I try to hit my web ...

ASP.NET MVC and ORM Selection

We are getting ready to begin redevelopment of a large aging internal enterprise application. We have decided to use ASP.NET MVC, but under consideration is which Object Relational Mapping (ORM) to choose. There are of course a multitude of open source and paid ORM implementations available. However, NHibernate seems to hold the largest ...

Recursive redirect on error handler page

Hey, I use the following MSDN code on my master page to detect if the browser accepts cookies: protected void Page_Load(object sender, EventArgs e) { if(!this.IsPostBack) { if(Request.QueryString["CookieTest"] == null) { Response.Cookies["TestCookie"].Value = "Test"; Response.Redirect("CookieCheck.as...

ReportViewer - access subreport/drillthough in serverside asp.net

Hi, When using the ReportViewer control in an aspx page. If you fire an event (such as clicking a row) which then displays a sub/drillthough report...How can you access that Report object on the server side? There is a DrillThough event for the parent report object that gets fired...but it doesn't seem to have any access to the new rep...

Want to use a jquery pop up, but get the data from server side.

When somebody clicks on my google adwords link like this: http://www.myshoppingsite.com/product/rubberball.aspx?promo=promo123 I want my aspx page to read the "promo" parameter, hit the database to pull back some data, then display to the user a nice jquery type popup window over top of the product page. The user can read all about th...