asp.net

Updating all ListView items together instead of one-by-one?

I have a invoice entry form in ASP.Net 3.5. I have a FormView for the main invoice form and a ListView for the invoice line items. I don't want to commit each line item to the database individually when the user edits them. I want to commit them all as a group when the user clicks a button to update the FormView. I suppose I could bind t...

SiteMapPath Disappears on sub page

For some reason on my page my SiteMapPath disappears. Site structure: WebApp -Default.aspx -> Reports\ ----Default.aspx ----MyReport.aspx Web.sitemap <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="~/Default.aspx" title="Overview" description="Overv...

How to access Web.config from a referenced assembly?

I need to access a web application's web.config from a referenced assembly. I need to get the file's path or the configuration object. I can't do this using System.Reflection.Assembly.GetEntryAssembly as I do for the application's configuration of a windows exe. Thanks ...

ImageButton event not firing inside Update Panel

This is sort of a follow-up to my question here: http://stackoverflow.com/questions/534045/asplabel-is-not-shown-when-visible-is-set-to-true In the above question, I had a few controls were the visibility was not being set to false because they were not in an UpdatePanel. Once I put the controls inside an UpdatePanel, the toggling of...

ASP.NET Dropdown - Works when MasterPage EnableViewState = true

I have a drop down menu and on postback, I cannot get the selected value. MasterPage EnableViewState = False Content Page ViewState = true DropdownList Control ViewState = true Doesn't work If I switch the Masterpage EnableViewState = true, it works, however the rest of the site really doesn't need view state so ideally I want it to...

How to dynamically Order a listbox with a dropdown?

I have a listbox with 20 colors. It looks something like this: 1:Red 2:Green 3:Blue 4:Orange 5:Red 6:Yellow 7:Orange 8:Red 9:Green .... It gets the data from an ObjectDataSource which in turn gets it's data from a method which returns a datatable. I want a dropdown which basically has 2 items, Order By # and Order By Color. If the u...

LINQ to SQL: Return anonymous type?

Using the simple example below, what is the best way to return results from multiple tables using Linq to Sql? Say I have two tables: Dogs: Name, Age, BreedId Breeds: BreedId, BreedName I want to return all dogs with their BreedName. I should get all dogs using something like this with no problems: public IQueryable<Dog> GetDogs(...

Asp.NET: UserControl's BubbleEvent not being handled by repeater or page

I have a user control inside of a repeater. The user control has an ImageButton, which when clicked, should raise an event to the page which will handle the event: //Button onClick event in user control protected void btnOpenOption_Click(object sender, ImageClickEventArgs e) { RaiseBubbleEvent(sender, e); } The following are two ...

Background Task still with cache? Or SO Team Find a Problem.

I am about to use what Jeff post about Easy Background Task in Asp.Net. I want to know if SO still use it or they found a Problem with the solution. Thanks ...

ASP.NET - Easy way to swap a boolean?

Background: I am using ASP.NET 2.0 (with C#) and the code below is embedded in a DataGrid control. I have the following in my .aspx file: <ASP:TEMPLATECOLUMN HeaderText="Includes CRS Statement?"> <ITEMTEMPLATE> <asp:RadioButtonList id="rblSCIncludesCRSStatement" runat="server" RepeatDirection="Horizontal" SelectedIndex='<...

Numeric Dropdown that 'turns into' a textbox when I select 'More'

I need to make a dropdown that has the numbers 0 through 10 in it, plus a "--More--" option at the bottom. If the user selects '--More--' then I want the dropdown to 'turn into' a textbox so they can enter a numeric value. I want the field name posted back to have the same form value regardless of which entry method was used. Preferably...

Adding new methods to LINQ to SQL generated classes

I am new to LINQ. I just dragged all my database tables onto the designer in a LINQ to SQL dbml. All my relationships are correct and look nice in the designer. I am able to pull data using simple LINQ code. I want to add my own methods now but don't want to blow away my changes if (when) I need to regenerate my dbml. I am guessing ...

SharePoint for a C# ASP.NET Developer

I've been asked to create a website in SharePoint within the next couple of weeks or so and I'm entirely new to SharePoint. Does anyone have any good examples/tutorials on how to do some basic operations such as creating custom forms, using basic CRUD operations, with a custom SQL Server database? Also is there any way to code in ASP.N...

New web service host 0.0.0.0?

Can anyone tell me why when I create a new web service in an asp.net project does it tell me that the host is 0.0.0.0? This is also disallowing me to test the webservice because its coming from a different IP than the host (obviously not 0.0.0.0). What the hell is going on? What did I configure wrongly? ...

Viewstate fails in IE Only

I have a page which contains some search fields to query a database, and display results. The viewstate is required to retain the lists of items in dropdowns. Everything works fine in Firefox (3) & Chrome, but fails in Internet Explorer, but only sometimes (certain actions, such as resetting the form, which really just does a response.r...

Type initializer exception - C#

namespace X{ public static class URLs { public static TabController tabIdLookUp = new TabController(); public static string DASHBOARD_AUDIT_PAGE = tabIdLookUp.GetTabByName("View My Safety", 2).TabID.ToString(); public static string URL_GENERATE_WITH_MID(String TabName, int PortalId){ { return tabIdLookUp.GetTa...

How to Convert Input Type=Text to Span

Is there a way to convert Input type=text to Span in ASP.Net ...

jQuery dialog not working after server-side redirect

I have an ASP.NET website which uses the jQuery dialog to present the user with a downloads terms dialog. Once the user has agreed to the terms in the dialog, the I perform a server-side postback which issues a Response.Redirect call to a page on another website which is responsible for serving the download to the browser. The problem is...

How to name fields using Dynamic Linq?

I have a huge query that is being made dynamically, but I want the select statement to not output the column names, buut custom values. FOr example, if I am doing a normal Linq query, I can do something like this: var v = from p in db.items select new { name = p.item_name, price = p.item_price }; which will give me the nice '.name' a...

ASP.NET: GRIDVIEW: How to strikeout the entire text in a row

Hi, I need to strikeout the entire text(even the whitespace between text/cells) in a row in the RowDataBound event of the GridView. Is it possible? ...