asp.net

How do you use Excel server-side?

A client wants to "Web-enable" a spreadsheet calculation -- the user to specify the values of certain cells, then show them the resulting values in other cells. (They do NOT want to show the user a "spreadsheet-like" interface. This is not a UI question.) They have a huge spreadsheet with lots of calculations over many, many sheets. B...

dateTime object in ASP.NET MVC

Has anyone successfully bound 2 textboxes to one DateTime property using the model binding in MVC, I tried Scott's method http://www.hanselman.com/blog/SplittingDateTimeUnitTestingASPNETMVCCustomModelBinders.aspx but was dissatisfied as this stops the HTML fields and Model properties having the same name (so the validation could not set ...

Adding Linq support to web project. Compiler chokes

I added a reference to the System.Core assembly. The web.config now has: <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> The IIS is set to use ASP.NET version 2.0.50727 Though intellisense shows the extension methods, the compiler does not understand the linq syntax. I can use Linq in ...

PartialView in web forms

I am working on a Web Forms application and I have some HTML code that I need in 2-3 more places. I've created .ascx control like so which represents the repeated code: protected override void Render(HtmlTextWriter writer) { StringBuilder str = new StringBuilder(); while (connRef.Read()) { st...

Stack overflow error when using JQuery/ASP.NET for simple ajax chat

Hello, I am trying to create a simple ajax chat using JQuery and ASP.NET. My code works like this: When the page loads it refreshes the 'chatbox' div with a request to the messages.aspx page, which handles getting new messages from the database and kicks off an auto refresh with the setTimeout(). Whenever the user clicks the send b...

Animating UpdatePanels

I've tried using the UpdatePanelAnimationExtender that is part of the Ajax Control Toolkit, but the biggest complaint I have with it is that it doesn't wait for your animation to finish before loading in the new content. I would like to do something like the following: Start Async request to server Fade out the content in the UpdatePa...

How to create a custom asp.Net Templated Databound Control ?

I would like to know if there is a good source of documentation for creating Asp.Net Templated Databound Controls or code samples for simple controls. All the documentation I have seen on the net seems way too complex. Is there a place where it is explained in a simple and easy to understand manner ? I could also be interested in text ...

User Group and Role Management in .NET with Active Directory

I'm currently researching methods for storing user roles and permissions for .NET based projects. Some of these projects are web based, some are not. I'm currently struggling to find the best method to achieve what I'm looking for in a consistent, portable way across project types. Where I'm at, we're looking to leverage Active Director...

Uploading images for user avatar

Right now I use Gravatar for user avatars on my website. I want to let users upload images to use as avatars from my website to gravatar so they don't have to visit gravatar if they choose not to, and I don't have to support multiple avatar methods. I don't know how to accomplish this in ASP.NET MVC. In Ruby on Rails they made it eas...

Hierarchical treeview implementation

What is the best way to generate a hierarchical treeview in asp.net (C#) from a SQL database table filled with all of a company's employees? I will never know at what level or employee I will be starting at. Any links or directions would be appreciated. ...

can jquery ajax call external webservice?

Can jquery ajax code call a webservice from another domain name or another website? Like this: $.ajax({ type: "POST", url: "http://AnotherWebSite.com/WebService.asmx/HelloWorld", data: "{'name':'" + $('#price').val() + "'}", contentType: "application/json; charset=utf-8", data...

ASP.NET Configuration Wizard to login with remote sql server

I have been learning ASP.NET by experimenting, watching videos on ASP.NET, and reading forums. I haven't found a quick solution to this though. Whenever I add the "login" or "createuserwizard" from the toolbox it always adds the new users to a database known as "ASPNETDB.MDF" even if I specify the remote database using a new SqlDataSou...

Code thinks Datagrid footer textbox is empty...

Hello All, I am working on an .net (C#) web application. Recently a defect came my way that stated that when two users were logged into the application at the same time they both could not update values without one refreshing the page. When I looked into the issue I discovered that the author of the code has used static datasets. I c...

Updating a dynamic control

I've got a custom web part with Accordion panes from the AJAX Control Toolkit as children that are used to render a site map hierarchy. Each pane includes a div with text input and 3 LinkButtons used to edit the sitemap data: "Add Child", "Update", and "Delete". Currently, all these controls are created in the overridden CreateChildCon...

If controls are always binded to data source controls in the order they are declared then

Hello, A) Question below is based on the assumption that controls are always binded to data source controls in the order they are declared? So in our example SqlDataSource1 will connect to data source prior to SqlDataSource2 and thus lstCities will be populated with values before GridView1, and reason for that being that lstcities was...

.NET Web Services - SOAP Faults

How can I have any uncaught exception get returned as a SOAP fault in my C# web service? It appears that IIS is 'catching' the exception and displaying it on the default error. Below is santized web.config. <?xml version="1.0"?> <configuration> <configSections> <section name="hibernate-configuration" type="NHibernate.Cfg.Confi...

Whats the best way to deal with pages loaded via browser history in asp .net?

I have an app which is very database and user intensive. The users are very keen on the browser history buttons for navigation. Is there a way that I can absolutely guarantee that the page will reload if a user picks something out of their browser history? What I regularly see is that a copy of the page will be shown from the browsers...

Why am I seeing different font sizes when printing a page from an IFrame?

I have a simple, table based HTML page with a very simple style sheet. I can open the page in IE7 and FireFox 3 and it looks exactly the same. I can print the page from both browsers and it looks exactly the same. We'll call the page "ProblemPage.htm" Now, inside an ASP.Net page, I create an IFrame and load that HTML into the IFrame lik...

How do I get jqGrid to work using ASP.NET + JSON on the backend?

Hi friends, ok, I'm back. I totally simplified my problem to just three simple fields and I'm still stuck on the same line using the addJSONData method. I've been stuck on this for days and no matter how I rework the ajax call, the json string, blah blah blah...I can NOT get this to work! I can't even get it to work as a function when a...

Dynamic validation based on selected item in dropdownlist

Hi, In my .aspx page, I have a dropdownlist and a textbox. The textbox has to be validated depending on the selection in the dropdownlist. I have only used the validation control on the .aspx page itself (not codebehind). How can I dynamically change the type of validation on the textbox? programatically? ...