asp.net

VSeWSS Administrator Privileges and <SafeControl> entry

I am trying to deploy my first custom aspx page in sharepoint: Windows Server 2003 Microsoft Visual Studio 2008 VSeWSS 1.3 Latest Sharepoint Patches as of May 28, 2009 I am following this detailed howto: http://geeksconnected.com/jamil/Lists/Posts/Post.aspx?ID=19 Unfortunately, it quickly becomes incomplete toward the bottom. I am...

jGrowl not working with MasterPage

Hi, I'm trying to use jGrowl in an aspx page. But I encountered a problem that I couldn't solve. When I use a regular aspx page the jGrowl is working fine. however when I use the page with a MasterPage the jGrowl is not working ,I got a javascript error saying $.jGrowl is not a function. From Firebug Console, I can query $; $("a"); the...

How should I set-up my solution when using ASP.net MVC ??

When using ASP.net webforms my usual solution would have following type of setup - MyCompany.MyProject.Presentation.MyWebFormsApp (asp.net web forms ) MyCompany.MyProject.Service.MyServieLayer (WCF/Web Service) MyCompany.MyProject.Business.MyBusinessLogicLayer (class project) MyCompany.MyProject.DataAccess.MyDALayer (class project/Linq...

Global Timer in Asp.net

I would like to have a timer for an ASP.net application that will kick off every Sunday night and perform something (update a table in the database). However, I really don't want to write up a service that has to be deployed on the server in addition to the web application. Is there a way to accomplish this easily? Perhaps using a Global...

What measures should I take to secure my multi-tier ASP.NET application?

I'm in a process of designing a multi-tier ASP.NET web application that is supposed to deal with sensitive information (say financial data). I would like to identify all potential threats the application will face in real life and plan the countermeasures accordingly. Some details: The application will be hosted in customer's data ce...

Can you use an asp:customvalidator with an asp:ChangePassword control?

I'm looking for ideas on how to use a custom validation control for an asp:ChangePassword control. A simple attempt to set the "ControlToValidate" property on the asp:CustomValidator control results in: Control 'changePassword1' referenced by the ControlToValidate property of 'passwordValidation' cannot be validated. Thanks. ...

What are the pitfalls of combining a web site project with a web application project in Visual Studio?

I have a web site project with a lot of files, it has become really slow to build. What I want to do is to create a web application project, and in Explorer add all the files to it, including the Bin folder. In Visual Studio I will not add these files (Show All Files will show them), only new files in one new folder that I am going to wo...

Thickbox asp.net mvc

Hello guys, I've found awesome using thickbox with asp.net mvc ....but now i need to use it with ajax and then....it displays only a blank page. It is not loading the page inside of it. This happens only on the ajax call...that i'm doing like this <%= Ajax.ActionLink("GetFuncao", "GetFuncao?height=155&width=300&inlineId=hiddenModalCon...

Caching ListView data a viable option?

Here's my scenario: 1) User runs search to retrieve values for display in ListView via LinqDataSource. 2) They click on one of the items which takes them to another page where the details can be examined, further drill-down can happen, etc. 3) User wants to go back to the original ListView results to select another item for inspection. ...

Sharing Authentication between ASP.NET sites

I have two ASP.NET sites (they can not run in the same process) and I need to share authentication between them. If a user is in site A already authenticated and then goes to site B, I need to have a way to share this information with site B so the user is not asked to authenticate again. The same is true both ways. How do you share t...

How do I avoid these deadlocks?

I have a routine which is updating my business entity. The update involves about 6 different tables. All the commands are being executed within a transaction. Recently, I needed to add some code into the routine which accesses a lookup table from the database. The lookup code already existed in another business object so I used that ...

Pass HTML from controller to view

Hello guys, I've made a structure to retrieve from database, based on the role given, to return menu itens. Now, I need to make a recursive method to render this HTML in the controller and pass this HTML to view. But i just don't know how to write native HTML in the controller. Any suggestions? ...

Why are my Chinese characters not displayed correctly in c# string

I am storing Chinese and English text in an SQL Server 2005 database and displaying it on a webpage, but the Chinese is not being displayed correctly. I have been reading about the subject and have done the following: used N before the text in my INSERT statement set the field type to nvarchar set the charset of the page to UTF-8 Chi...

Passing a variable value from javascript to ASP

Hello all, With the help of this community, I've been able to pass a static chunk of text from javascript (clientside) to ASP 3.5 (server side)! This piece of code works beautifully: $('.drop').droppable({ tolerance: "touch", // Here should be a string drop: function() { $('[id$="myHidden"]').val('Testy test test'); __...

ASP.Net Binding to Gridview Strips some space (whitespace characters)

I am retrieving data from an Oracle database and binding the same to a gridview control. I noticed that there are instances when the column contains a single quote or double quote, the spaces or whitespace characters get stripped off. Sample of some data in fields in Oracle: To Be Phased Out ASAP ' ", When retrieved, it becomes... ...

Add <pre></pre> tags to ItemTemplate in GridView

My item template in gridview is marked up like this. Where do I add the tags? <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<% Eval("datacol") %>' </asp:Label> </ItemTemplate> ...

ASP.NET request lifecycle confusion

I am new to C# and .Net and am coming from a Java background. I am trying to get my head around the .NET way of doing web applications and am not having much luck. I want to build an application to handle requests urls and write responses that return images. Having only used Java servlets in the web application field I am after some goo...

Is there any good open source ASP.NET application using MVP pattern

Hi All, I'm trying to upgrade my existing web forms application to upcoming framework and rewriting couple of workflow as per the new business requirements. I want to introduce TDD based development in this project but after some investigation found that ASP.NET MVC will not help me as my web existing application is using lots of Infra...

How do you get the UserID of a User object in ASP.Net MVC?

I have some tables that have a uniqueidentifier UserID that relates to aspnet_Users.UserID. When the user submits some data for those tables, since the controller method has an [Authorize] I get a User object. I can get the username with User.Identity.Name, but how do I get the UserID to be able to establish (the ownership) relationship?...

System.DirectoryServices.AccountManagement in .net 2.0

Is there a: string name = System.DirectoryServices.AccountManagement.UserPrincipal.Current.DisplayName; equivalence in .net 2.0 framework? It uses the System.DirectoryServices.AccountManagement (ver 3.5) reference. I tried using that file on a .net 2.0 framework but to no avail. Basically, I want to retrieve the full username (f...