asp.net

Applying Css Style to Asp:Menu MenuItem

Hi, I'm essentially creating a vertical breadcrumb to create a website navigation for a mobile (iphone) website. Similar to maybe how http://news.bbc.co.uk/sport1/hi/football/default.stm works as you click into "Premier League" Using the Asp:Menu control and a SiteMapDataSource I am binding only the current levels links within the site...

Parse page HTML output

Hi, I'd like to know one (or more) ways to parse the HTML page output. I'd like to detect some patterns on the HTML that will be send to the client and log some info if present. ...

Creating Dynamic Menus - calling extern Function

I got a requirement to create a dynamic menus using extern function so, we can consume it anywhere, following is the complete requirement : Please create a dynamic horizontal link menu in the top of the Master Page. This will be the menu that is displayed on every page. We need to be able to set the links on this page from the code ...

"Seeing" what is in the asp.net data cache

Is there a way to see what is in the ASP.NET data cache at any given time? For example to render the contents as a hashtable view (key/object id)? ...

output data to text file in asp. markup code

I downloaded some sample code which includes a database query within the markup code. It makes a query to the database and displays the results of the web form and I would like to divert the output to a text file and I am not sure how to do this? Can this be done from here or would it just be easier to code it in the source and make a ne...

Address data extraction from text via asp.net (vb.net)

I have address data that is surrounded by random text. Is there a way to extract this data either with a call to a web service or some vb.net function? example: 1111 S WILSON ROAD APT B8 CITY STATE 55555 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

Image URL in a ASP.Net Page

Hi, I have a default image in my folder in visual studio. How can I get the server path to find the image in runtime in code? if (String.IsNullOrEmpty(entry.Picture)) { //image1.ImageUrl = @"F:\Temp\Projects\IMEICHECK\IMEICHECK\Images\Design\New\no-image.gif"; } else image1.ImageUrl = entry.Picture; ...

Get previous page URL after Response.Redirect

I'm trying to get the previous page URL after I do a response write and i've looked around the web and people are using HTTP_REFERER but that doesn't work with Response.Redirect so is there anyway to get the URL of the previous page? I have this code on a few pages and i need to know which page it is coming from when it gets to the serv...

How to design a GridView?

Hi, i have followed GridView in my ASP.Net Page: http://s2.imgimg.de/uploads/14b706b38JPG.jpg It should look like this: http://s2.imgimg.de/uploads/392bac9b9JPG.jpg (Made by mine designer in Photoshop). (The header Background is a file) I tried a lot, but it seems very very hard to design this. Here is my code: <asp:GridView...

Creating project from existing IIS/ASP.NET website, building stuff

So I'm left maintaining a proprietary codebase from a third-party vendor. The vendor is still sort of around, but support is limp. The site is ASP.NET. I have made some changes but I am having a really hard time getting IIS to compile these changes in. The bin/ directory has what I believe is a precompiled dll for the core classes. I've...

ASP.Net HyperLink control enabled propery is not working in IE 8 compatibility mode?

We have following ASP.Net 2.0 HyperLink Control: asp:HyperLink ID="FolderLink" runat="server" CssClass="cursor" Enabled="false" ImageUrl="/_layouts/1033/images/selectlink.gif" ToolTip="Folder Links"> On server side, following script is attached: FolderLink.Attributes.Add("onclick", "javascript:setURL('Control');"); Issue is that Hype...

Inserting new row in gridview using an external Add button and a list as data source

I have a grid with three columns, two of which contain drop-downs, all of them getting filled from a web service result set. Now I want to allow the functionality of adding a new record in the grid by clicking an Add button present outside the gridview. Whenever the user clicks the Add button, a new record should be created in the grid ...

ASP.NET Membership multiple signed in?

Hey Is there any way (Via IFRAME or something like that) to enable me browse to 2 different pages on the same browser on 2 different accounts in the ASP.NET membership? Thanks ...

NullReference on a value that is not null

I have a function that gets a string passed to it. When testing the function, I'm getting a null reference exception on the string parameter that gets passed to it, even though the string is not null, I don't understand why I'm getting this error. I have a screen shot below I used a dummy value to verify both the string parameter in...

ASP.NET: Programatically DataBind a GridView control

I have a blank/unbound GridView control on my form and I am binding it in the code behind like this: GridView1.DataSource = _dataSet DataBind() Running this code populates my GridView control with all the columns and data that _dataSet has. I want to display only some of the columns, change the column names, and rearrange some of thes...

Why the CSS style is not applied in webpages within subdirectories?

In the root of my domain i have the CSS file style.css and the masterpage file site.master. The link to the CSS file within the site.master is <link href="style.css" rel="stylesheet" type="text/css" media="screen" /> The problem is that webpages contained within subdirectories do not inherit the CSS file. What am i doing wrong here?...

Unable to run .exe installer from ASP.NET page

I'm attempting to create an ASP.NET/C# page that runs a PowerShell script that will run an .exe installer. The ASP.NET page is currently running in IIS 6.0 on Windows Server 2003. The PowerShell script works correctly from the PS command line but when invoked from the ASP.NET page the page just hangs. No processes are created and it ap...

Validator offers no controls to validate.

I've created a DetailsView with a Calendar TemplateField. When I drag a RangeValidator near the calendar to try and validate the date range, the ControlToValidate dropdown property for the RangeValidator is blank and fails to display the Calendar control for me to select it. How can I get the RangeValidator to show the calendar in the ...

Validating Data Type before importing data from excel through SQLBulkCopy

In my asp.net website i have a functionality where user can import data from excel. I am using SQLBulkCopy to implement it. I have a instead of Insert trigger ( to check for duplicates) on the table in which the data is being imported. Following are 2 issues which i have. Question 1. When excel contains only one record which is duplic...

Is there a Javascript library to parse and pretty print .NET exceptions returned as JSON?

If I'm making a call to an ASMX web service and an exception occurs, the web service will return something like this: {"Message":"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).","StackTrace":" at System.Guid.TryParseGuidWithNoStyle(String guidString, GuidResult& result)\r\n at System.Guid.TryPars...