asp.net

Passing int list as a parameter to a web user control

I want to pass an int list (List) as a declarative property to a web user control like this: <UC:MyControl runat="server" ModuleIds="1,2,3" /> I created a TypeConverter to do this: public class IntListConverter : System.ComponentModel.TypeConverter { public override bool CanConvertFrom( System.ComponentModel.ITypeDescr...

ASP.NET AjaxControlToolKit Accordion set active pane via javascript

I would like to be able to change the active pane of an accordion using javascript. I see a behavior set_SelectedIndex but I can not seem to get it to work. How can I find out what the supported methods are for this control? How can I set the selected index from the page? ...

Checking for Shift+Click or Ctrl+Click in a Web User Control

I have a requirement to produce a Web User Control (in C#) which will exhibit different behaviour when clicked depending on whether the shift (or control) key is pressed at the time. The control itself will contain an ImageButton and/or Hyperlink. Is this possible? Basically, if the logged in user is an Admin then I need to allow them ...

Is there a way to tell what files are not being used in a web application project

I have a project with literally thousands of image files that aren't being used. The main problem is that they are intermixed with images that are. Is there a way to get a list of all project artifacts which aren't referenced? EDIT: Assuming I don't have access to the web logs... Is there an option? ...

Odd issue with textbox and ASP.NET

This code was working properly before, basically I have a master page that has a single text box for searching, I named it searchBox. I have a method to pull the content of searchBox on form submit and set it to a variable userQuery. Here is the method: Public Function searchString(ByVal oTextBoxName As String) As String If Master...

Why don't you source control your references directly?

I'm in the process of establishing some new source control best practices for my organization, so I've been immersing myself in things like TreeSurgeon for the past few days. One thing I see a lot is that it's a best practice to include your references in your source control tree, but in a seperate directory (lib/ in tree surgeon) rathe...

Formview Being Cleared

My problem is that all the textbox's my formview are getting cleared when I hit the submit button. I currently have a page with a small section that has an update panel around it. This small section adds an address to my databse. To the left of this form there is a gridview that is tied into the formview. So if i click on an item in the...

Asp.Net : Extended range validation

Hi, I'm using Asp.Net 2.0. I have a scenario where i need to check a user input against any of two ranges. For e.g. I need to check a textbox value against ranges 100-200 or 500-600. I know that i can hook up 2 Asp.Net RangeValidators to the TextBox, but that will try to validate the input against both the ranges, an AND condition,if yo...

Sharing .NET session/authentication with Flex

I have a .NET 1.1 application (VB.NET 1.1 shopping cart) into which a user authenticates. I want to 'bolt on' a Flex application but dont want to have to have the user reauthenticate. They shouldn't know it is a separate application. I want to use WebServices (C# 3.5) over some kind of secure channel. My main question here is how do I...

How do I access properties from global.asax in some other page's code behind

Imagine I have a property defined in global.asax. public List<string> Roles { get { ... } set { ... } } I want to use the value in another page. how to I refer to it? ...

Passing data to server code from a client-side control using ASP.NET AJAX

I have a ListView on a page that displays a list of widgets. When a user clicks on one of the items in the list, I want to display a ModalPopup that contains controls allowing the user to operate on the item they selected. I could easily accomplish this by placing a Panel and a ModalPopupExtender in the ListView's ItemTemplate, but thi...

Access an asp:hiddenfield control in JavaScript

What is the best way to access an ASP.NET HiddenField control that is embedded in an ASP.NET PlaceHolder control through JavaScript? The Visible attribute is set to false in the initial page load and can changed via an AJAX callback. Here is my current source code: <script language="javascript" type="text/javascript"> function Acc...

Shared Hosting <trust level ="Medium" />

I'm a bit surprised that this isn't on more forums as it is a total show stopper. I have a ASP.NET app that calls a web service I wrote. It is hosted on a shared hosting site. Recently the company moved my server to allow for both 1.1 and 2.0 applications. The trust level has changed from 'full' to 'medium' and my code has stopped worki...

How can setup a friendly email name in the MailSetting section of web.config?

Currently I have: <system.net> <mailSettings> <smtp from="[email protected]"> <network host="localhost" port="25" /> </smtp> </mailSettings> </system.net> How can I change it so the email is sent with a name and not the email address only? ...

How can i output NLog stuff to the vs2008 'output' window?

Hi folks, I'm using NLog to log my stuff. I'm trying to send the output to the console (or colouredconsole) ... which i'm hoping would goto the visual studio 'OUTPUT' window for any ASP.NET web site/app/mvc app. It's not. If i change the target to 'file' then it works for sure. So - can NLog output to the 'output' window for web...

How Do I get Started With ASP.net?

I just found out that I would be using asp.net in my new job. I have no idea how to get started. Where can I learn the basics about asp.net? What IDE is used? Any basic tips? I recently found out what ASP.net is too! ...

ASP.NET Formview Item Inserting Event

Hi All, I'm using the FormView control in ASP.NET for a simple form to insert into a MS SQL DB. I have an event for onItemInserting to set some values behind (such as time stamp, etc) and was curious how to check some user entered values in the onItemInserting event and cancel the item from being inserted. The reason I want to do it in ...

How to post a page from asp.net to classic ASP

I'd like to post some form variables into a classic ASP page. I don't want to have to alter the classic ASP pages, because of the amount of work that would need to be done, and the amount of pages that consume them. The classic ASP page expects form variables Username and Userpassword to be submitted to them. username = Request.Form("U...

how to write vb code for custom paging and custom sorting in sql and asp:repeater

pl give vb code for custom paging and sorting in asp:repeater using stored procedure ...

Tab Navigation - Frames or AJAX?

I have what I imagine to be a pretty standard web-interface. There are 4 different ListViews (grid controls) which are accessed by a series of Tabs on the top. I have implemented this as follows: Tab 1 will load Page 1 containing Grid 1 into Frame 2, Tab 2 will load Page 2 containing Grid 2 into Frame 2 etc. However this then mea...