asp.net

ASP.NET applicationSettings (Giving Me) Fits

I've read all of the examples and I've yet to figure out how to get information out of the web.config file using applicationSettings (as opposed to appSettings). I have the following for my configSections: <configSections> <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4...

Risks of running asp net aplication with an administrator account

Hi, I'd like to know which are the security risks of running an asp net application with an administrator account. I might end up doing this and I'd like to be aware of the known security wholes I would have. I'm connecting to a sql server using sql authentication so excessive privileges to execute queries is out of the list. ...

asp.NET Web.config

Hello guys i have an website online wich access the database. The database access for the connection String called GardenLadies is fine and works. I've added to the host database also the localsqlServer database info. My problem is when i log in it gives me "Server Error in '/' Application.". here´s my web config <?xml version="1.0"?> ...

Aspnet Compiler is compiling my aspx files

I'm using the aspnet_compiler compiler program as part of the automated build procedure for a website. We have a website project and the build step generates the assembily for the project for the release build. However it generates these dlls in such a way that the aspx pages reference those at the moment randomly named assembilies. So m...

ASP.Net MVC Controller UpdateModel not updating

Trying to get UpdateModel to work for my User. The User class has basic string properties like CompanyName, FirstName, LastName, etc so nothing exotic. Here is the header for my view: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Public.Master" Inherits="System.Web.Mvc.ViewPage<User>" %> After they submit, in my c...

How do I set the timezone in an iCal feed using DDay.iCal?

I'm creating an iCal feed using DDay.iCal. It works, but I can't figure out how to set the timezone for the feed. Here's the basic code: iCalendar iCal = new iCalendar(); // <-- Set the Timezone HERE to PST (Pacific Daylight Time) Event evt = iCal.Create<Event>(); evt.Start = new iCalDateTime(meeting.MeetDate); evt.End = evt.Start.Ad...

IE:how to get popup's opening window when using window.open(url)

we are running a click-to-call service, my idea is basically like this: website have a link on their page, when the link is clicked, a web page(say it is popup.aspx) hosted on our server is popup, user can input their phone number, and click "call me" button to let the website call him. In the button click event, I want to get Request.Ur...

Microsoft AntiXSS - Is there a need to Decode?

The HttpUtility class provides for both encoding and decoding. But, when I use the MS AntiXSS 3.1 Library I have a set of methods only for encoding, does this mean decoding can be avoided? For example Before applying AntiXSS: lblName.Text = "ABC" + "<script> alert('Inject'); </script"; After applying AntiXSS: lblName.Text = AntiXSS...

How to not open a new window (JavaScript popup) if jQuery validation plugin returns false? (ASP.NET)

Hi, I have an .aspx page with a couple of textfields. I validate these with jQuery validation plugin when the user clicks the submit button. When the submit button is clicked I also open up a new window, but I only want to open the window if the fields are correctly filled out. How do I stop the window from opening if the fields are no...

Structuremap error when using HttpContextBase in constructor

I am building a ASP.NET MVC 2.0 app on .NET 4.0 and am using Structuremap 2.6.1 for IoC. I recently added a ICookie and Cookie class, the Cookie class takes HttpContextBase as a constructor parameter (See below) and now when I run my app I get this error :No Default Instance defined for PluginFamily System.Web.HttpContextBase. I have us...

jQuery UI + ASP.NET: Make Modal Popup Load After AJAX is Ready

Hello StackOverflow! I was hoping for a little help. I am currently using some of the jQueryUI widgets in an ASP.Net Web App. I have successfully got everything working. Basically, I have a GridView on a page which contains some hidden fields in each row containing data. I also have a dialog div containing an update panel and a few Label...

ASP .Net: AspNetSqlMembershipProvider "unique email" problem

Hello, I am using AspNetSqlMembershipProvider in my ASP .Net 4 web application project. I have configured user address to be unique (requiresUniqueEmail="true") in my web.config file as below: <membership> <providers> <clear /> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembe...

Difference between Server.MapPath and Page.MapPath

What is the difference between those two? If I only want to retrieve the absoluate path to an image on web server, is Server.MapPath safer in any case? I'm using Page.MapPath right now, but it won't work if control was created in WebService since control.Page property become null? Whether Server.MapPath always work? ...

ASP.NET MVC2 with Entity Framework 4 - AsEnumerable() or ToList() in repository?

So I've been advised a few times to disable lazy loading when building an application with the above frameworks, and that ToList() will force the queries in my repository to execute. I was told that I would avoid certain "traps" I might run into if I used AsEnumerable(). On a recent question, however, I included a bunch of ToList()s ...

Telerik RadControl(ASP.NET AJAX): Can't find control using suggested method

We are using Telerik radcontrols in our web form and I am trying to solve an annoying problem for a while. According to Telerik, I should be able to find my control from client-side using the following method, var element = $find('<%= dateSampleDate.RadDatePicker_ClientId %>'); [A little clarification about the statement above: This R...

Embedding Silverlight App into ASP.net webpage for smoother transition

Hi All, Currently I have a pure silverlight website with navigation. Im worried about the customers that are hitting the website and are leaving straight away because they are have to have the SL plugin installed and they also have to wait for the 1.5 meg xap file to download. The first page of the silverlight application is the login/r...

Good/Simple webservice which can be consumed using asp.net...

I was looking for Good/Simple webservice which can be consumed using asp.net but i can't a find a free webservice that can be used with asp.net.. ...

inside update panel of Content page jquery tooltip position error

Hi Everyybody I am facing problem in Jquery tooltip. I m using ASP.Net. Inside content page i m using Gridview and on mouse over of label i m showing tooltip. I m using jquery tool to show the information. Its working Fine but the tooltip position is not changing according to the position of the mouse. Its showing the changing infor...

What are the important points to be considered before making a user control?

Suppose I want to make user control which will use in other pages. What are the important points to be considered before making a user control in ASP.Net using C#? ...

Update client image after uploading with AsyncFileUpload Control in AjaxControlToolkit

Hello everyone, I am uploading an image with AsyncFileUpload, it works well, but i want to show to the user the image which him just uploaded, but i am having troubles to make that work. I have tried the OnClientUploadComplete event which receive sender and args paramenters, but the second paramenter only have the file name (without r...