asp.net

Elmah - ASP.NET -> Multiple Connection Strings -> Set SQL Error Log Connection String in Code

I am looking to integrate ELMAH into an existing ASP.NET application to further support error investigations and could use some help with the connection strings. We use a single web.config file for all or our environments the application is deployed in, and at runtime, the app decides which environment it is in, typically based on URL. ...

Calling Webservices via code security for logging onto service (.NET / WCF)

My web app is going to call a webservice. I'm looking for best practices / guidance for logging onto the webservice so I know that an authorized user is trying to access it not just anyone. ...

web.config does not contain a membership section

I'm following this walktrough: http://msdn.microsoft.com/en-us/library/879kf95c.aspx to add user login and register pages using out-of-the-box asp.net login and registration controls. For example, for the user registration I'm using CreateUserWizard. Now I want to customize the registration process, I want to remove the security questio...

Changing WebControl Property Inside of a Repeater

I have a repeater control that contains an ItemTemplate containing a databound label and a DropDownList control. With each iteration, I'd like to change the ID of the DropDownList with each iteration, in order to use the values as inputs upon submission. Can anyone tell me how this is usually done? Thanks. ...

ASP.NET TimeLine Control

I am looking for a free control to display events in a to-scale-timeline. I couldn't get TimeLine.NET to work. Is there anything else I could try? EDIT Any flash or javascript solution would be fine as long as I can put data into it from a database. ...

FormsAuthentication.FormsCookiePath

Hello, Q1 I’ve read that when setting the timeout of an authentication cookie, we should keep in mind that the longer the cookie persists, the greater the chance of a cookie being stolen and misused. A) But assuming we secure our application against replay attacks by enabling SSL for the entire application, and since forms authent...

ASP.NET CheckBoxList DataBinding Question

Is it possible to DataBind an ASP.NET CheckBoxList such that a string value in the data becomes the label of the check box and a bool value checks/unchecks the box? On my asp.net webform I have a CheckBoxList like this: <asp:CheckBoxList runat="server" ID="chkListRoles" DataTextField="UserName" DataValueField="InRole" /> In the code ...

Dynamically Add Footer to ASP.NET GridView

I am trying to add a footer row of DropDownLists to my GridView control. The problem is that I do not know how many columns will be in my DataSource at design time, so I am trying to use the AutoGenerateColumns=true and not specify the column templates. Therefore the way I am adding the DropDownList controls to the footer is in code dyna...

Show pictures on mouseover

I have an ASP.NET page where I am showing products in a Gridview control. When users mouse over a Product name a window should appear and show that Product's picture in it (by getting product id and than find associated image for it.) Is there an AJAX control or something like this?? ...

SqlException: Login failed for user 'NT AUTHORITY\NETWORK SERVICE

Hello, When I run web application via VS 2008, the application is able to log onto Sql server and check credentials ( user name and password ) entered by the user, but when I browse to this application via IIS 7 and try to postback user name and password, the application reports an exception: System.Data.SqlClient.SqlException: Logi...

Show/Hide an accordion panel in Jquery when clicking edit in a gridview?

I have a Jquery Accordion and I have a asp.net GridView below that. When I click on the edit button in a gridview row, it goes and grabs some data. Depending on which row is clicked, I want to show/hide an accordion panel. Can I accomplish this in the GridView_RowEditing event, if so, how? ...

How can I temporarily impersonate a user to open a file?

I would like to temporarily impersonate a domain user account to read in a file on a network drive from an ASP.NET site. I would rather not set up impersonation for the entire site or set up a mapped drive on the server. ...

Creating "pluggable" apps in asp.net mvc

I've been working with asp.net MVC and am still not very good at it. However, I have started wondering how would I go about creating applications that can be "plugged" or installed into an existing ASP.net MVC site with minimal complexity. For example, in ASP.net web forms I developed a sort of Blogging app. In order to install this ap...

ASP.net MVC, display a view from another controller

Is it possible to display a view from another controller? Say for example I have a CategoriesController and a Category/NotFound.aspx view. While in the CategoriesController I can easly return View("NotFound"). Now say I have a ProductsController and an action and view to add a product. However, this action requires that we have a Cat...

pageload in c#

Here is a piece of code that I've written. The problem that I'm having is: When i click a button in the gridview "rowcommand" adds the item to an arraylist which works fine. After the user clicks the button the page loads again and it goes to "rowcommand" AGAIN! As a result the same value is added to the arraylist. Is this something re...

Is it possible to update/insert data into dataset with SqlCommand?

I use this code to update data in database table. Can reuse same code to update a dataset? Thanks. using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["Northwind"].ConnectionString)) { string sql = "UPDATE tbh_Categories SET Title = @Title, Description = @D...

Posting data from one asp.net page to another

Ok I have done enough research on it but cant find the solution. Its from one page of a application to another page of application. Since I would be sending in username and password i cant send it as "getT" so i need to do a "post". I will be using ssl though - not sure if that helps.. so i cant use sessions as its on different apps and ...

Using SubSonic in VB.Net web application

Hello, I am using Subonic in a VB.net application for the first time (I have used it succesfully in a WebSite project plenty of times). I followed the 2nd part of the 'Getting Started' video to actually generate the DAL source files as opposed to the build provider method and everything APPEARS to have gone like expected. However, no...

asp.net session state

Hi, During Session Start, one has access to the Request object. How about Session End, does it still have access to the Request object ? For example I want to count how many browsers are currently connected to my application. Edit 1 : If Session End doesn't have access to Request Object, what info does it have access to ? Session ID...

asp.net web page to device connect to server's usb (COM) port

Hello All, I am working on a way to send commands to an Arduino board from a web site. The Arduino board is connected to the computer via a USB port (a COM port) I have managed to connect and control the board using a VB.net program. I also wrote a vb.net class that can instantiate a COM connection and send and receive messages. My ne...