asp.net

Problem rendering error text from Custom Validator

I have a page that is trying to login a user. at the top of the page, I have a ValidationSummary control. I don't have the controls explicitly declared in the page and am calling a static method to add the Validator to the page on an error. (see below) When the page is submitted, the ValidationSummary appears, however, none of the err...

How to start aspnet_wp.exe without firing Application_Start event.

I'm trying to debug a web service (Windows XP SP3, VS 2008, ASP.NET 2, VB.NET). For most of it, if the asp.net worker process is already loaded, I can start the Windows form that calls the web service, attach to aspnet_wp.exe in Visual Studio, and then debug to my heart's content, but catching the Application Start event in global.asax ...

How do you handle reporting filters in ASP.NET MVC?

For a given report, the user will want to have multiple filtering options. This isn't bad when the options are enumerations, and other 'static' data types, however things can get silly fast when you need a select list that is populated by fields stored in a table in the backend. How do you handle this scenario? I find myself constantl...

Can't get values from rows/cells in GridView

Hi there, I'm trying get values from a GridView using the following code: foreach (GridViewRow row in this.dgvEstudios.Rows) { var xy = row.Cells[1].Text; } Always get a an empty string ("") as the value returned from .Text, why does this happen? I have set EnableViewState to true ...

Read single value from query result

I am trying to return the result that I found in my query to the ASP.net table. How do I do that? I already have the query, I am just having trouble getting the count result back. string configMan.ConnString["connect"].ToString(); iDB2Conn temp = new iDB2Conn string query = "select Count(*) as total from test"; ... this is where I...

Does ASP.NET have built in support for skinning logos?

I'm using logos as just an example. I'm trying to use themes/skins for the first time in ASP.NET - and just trying to figure out exactly what they will allow me to do. As far as i can tell themes are primarily for changing controls like buttons, which can be modified using images. But is there a way I can skin a 'logo' or other graphic...

How do you track down dependencies for ASP.NET Web Site?

The dynamic compile-on-the fly approach seems to fall outside the capacity for the typical tools which would extract this kind of information. I know I may be better off converting to a Web Application, BUT I would like to ask how it could be done in the case of a Web Site Project. ...

Storing an SqlDataReader-object in C#/ASP.NET?

I'm currently writing a C#-class in my ASP.NET (3.5) application to handle all database-queries. Some of the methods are there to make a select-query to the database. Inside the method i simply have a SqlDataReader r = command.ExecuteReader(); to fetch the data. I now want r to be returned by the method, but when i close the database-co...

ASP.NET 2.0 - Validating nonvisible Controls on the same page?

I have an application that uses RequiredFieldValidator controls with a ValidationSummary and once a "Finish" button is clicked all the fields are validated. This page has several different parts of it that are made visible or invisible and I noticed that the Validators only activate for visible controls and ignore the invisible ones. Thi...

Can you use an ASP.NET web control (ASCX) to render XML?

Off the top of my head, I don't see any reason why you couldn't structure an ASP.NET custom web control (ASCX file) to output only XML. If you avoid using controls in the System.Web.UI namespace, and just use XML tags and sub-controls, which also render only XML, you should end up with a perfectly valid XML document being rendered. Am ...

How do I create an ASMX web service page without a code behind file

I have been able to create ASPX pages without the code behind, but I can't for the life of me figure out the magic combination to get an ASMX page to work without a code behind. Is this even possible? Thanks ...

Possible Encoding Issue Reading HTM File using .Net Streamreader

I have an HTML file with a ® (copyright) and ™ (trademark) symbol in the text. These are just two among many other symbols. When I read the html file into a literal control it converts the symbols to something else. The copyright symbol converts to � (open box in ff) The trademark symbol converts to ™ (as expected) If (System.IO.File.E...

HTML Tool to determine where style is coming from

I have an ASP.NET page where I need to figure out where the style for a textbox is coming from. There are several style sheets defined for the page and I want to be able to use some sort of tool / editor that will tell me what styles were used and from what file(s) to render the textbox. Thank you. ...

Deriving a crypto key from a password

I am trying to generate a key using the .net 2.0 PasswordDeriveBytes class. PasswordDeriveBytes pdb = new PasswordDeriveBytes("blahblahblah",null); byte[] iv = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 }; byte[] key = pdb.CryptDeriveKey("TripleDES", "SHA1", 128, iv); The code throws "CryptographicException: Invalid flags specified." w...

how to use asp.net dynamic data with Entity framework in another dll

how can i use asp.net dynamic data using EF in another dll and i dont want to put connection string in web.config or any config file. I have this code in Global.asax model.RegisterContext(() => new MyObjectContext("entityconnectionString"), new ContextConfiguration() { ScaffoldAllTables = true }); the defalut page is ok but when i cli...

Create SubSet of a dataSet ASP.Net

I have a dataset which is having some 28 columns Now I want to make another dataSet that will contain two dataTable having 14 columns in each table from the previous dataset. Help needed. ...

ASP.Net Gridview, How to activate Edit Mode based on ID (DataKey)

I have a page, lets call it SourceTypes.aspx, that has a a GridView that is displaying a list of Source Types. Part of the GridView is a DataKey, SourceTypeID. If source TypeID is passed to the page via a query sting, how to I put the Gridview into Edit mode for the appropriate row based on the SourceTypeID? The GridView is bound to a S...

Using FreeText with SubSonic

Is there a general consensus on how to use SQL 2005's full text search with SubSonic? I know that I can use the InlineQuery and get an IDataReader, but is this the only way to do this? Also, how would I incorporate paging into it? Would I have to write the paging myself in the InlineQuery? What I would really like to do is something ...

Export to Excel from a Repeater?

Right now I am using this to export a repeater (with multiple nested repeaters) to excel: protected void ExportToExcel(object sender, EventArgs e) { Response.Clear(); Response.Buffer = true; Response.AddHeader("content-disposition", "attachment;filename=finance.xls"); Response.Charset = ""; Response.ContentType = "application/vnd...

Adding a search box to an ASP.Net dynamic data list page

Does anyone know how to add a simple search textbox on an ASP.NET Dynamic Data list page? I want to be able to drill down to a specific row immediately, without having to use the dynamic data filters to narrow the scope. ...