asp.net

What's the Best Way to use Response.Redirect to for A Pop-Up in a .NET Web Application?

I'm trying to do this in a way that will prevent end-user browser security features (such as a pop-up blocker) from getting in the way of my application. ...

ASP .NET with MySQL - DeleteCommand syntax not working

Working on setting up a SqlDataSource connecting MySQL database to a ASP .NET GridView. The Delete Command is: DeleteCommand="DELETE FROM troutetracking WHERE id=?id" The Delete parameter is: <DeleteParameters> <asp:Parameter Name="id" Type="Int32" /> </DeleteParameters> When I run a delete link on the Gridview the following...

SEO friendly 301 redirect .htm to .aspx

I currently have a small-midsize website with .htm extensions. I have redesigned the full website, this time using a .aspx extension. I want to issue 301 redirects to keep my search engine rankings, but am unsure of how to do so from an .html page in a spider friendly way. With research I have repeatedly encountered references to ISAPI r...

How to get XML from Ajax jQuery Instead of json

Hi I write a method on my page that return a XMLDocument.This is my method: [System.Web.Services.WebMethod()] public static System.Xml.XmlDocument MyGet() { string cnn=System.Configuration.ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString.ToString(); SqlConnection cn = new SqlConnection(cnn...

How do you profile a production ASP.NET applicaiton?

We have some performance problems with one of our applications. I thought about using something like dotTrace to find out where the problems are, but dotTrace would probably degrade performance even more. What's the best way to profile an application that's on a prod environment w/o affecting performance too much? ...

Leverage .Net to deal with 133 textBoxes?

I have a 19 X 7 table with a textBox in each cell. Some textBoxes need to be read only, depending on the data that is loaded into them. On saving I have to examine each textbox and see if the value needs to be saved. Having to list 133 textboxes by hand takes a long while. I would be ecstatic to get it down to a row level, so I would onl...

Casting problems when trying to be generic / 'type free' | ASP MVC

Question Is there a way to define a method only once in C# (in a helper class or something) not knowing which type is given to be returned? Long explanation I get the following error: Unable to cast object of type System.Data.Objects.ObjectQuery1[WerkStageNu.Vacancies]' to type 'System.Linq.IQueryable1[WerkStageNu.Models.IFil...

What initializes the security context in forms authentication?

If FormsAuthenticationModule detects forms authentication ticket in the request, it automatically creates security context by initializing HttpContext.Current.User property. This happens during Application.AuthenticateRequest event. Assuming we log in user via CreateUserWizard control, then by the time CreatUserWizard's ContinueButtonCl...

Added ( to CreateUserWizard control ) additional wizard steps after CreateUserWizardStep and CompleteWizardStep, but they don't get displayed

Hello, I'd like to add ( to CreateUserWizard control ) additional wizard steps after CreateUserWizardStep and CompleteWizardStep, but when clicking on ContinueButton in CompleteWizardStep, instead of being forwarded to next wizard step, nothing happens! What am i doing wrong? thanx EDIT: <asp:CreateUserWizard ID="CreateU...

WCF Client Calling ASP.NET Service - Authentication

I have a brand new WCF client (I added a service reference through VS2008) which calls an older ASP.NET service app. The ASP.NET app is hosted in IIS 6 on Windows Server 2003 and allows Windows Authentication and Basic Authentication (configured on the virtual directory for the web site). One of the places I'm deploying my client to is ...

How to divide a Literal into two parts

I am displaying content from my database in my Literal control kept on an asp.net page. I want to fetch all the data, but using script display only a portion to the user. A link called 'Read More..' will get dynamically added at the end of the text. If the user enjoys reading a portion, he/she can click 'Read More..' and go through the...

Visual Studio Shows errors until I open the *.aspx.cs page???

The Visual Studio Error List shows like 50 errors about controls and variables not existing. I double click an error, it takes me to it, and after about 1 second they all go away! There aren't any real errors, as my site compiles without errors or even warnings. I know I've seen this before, but I forget how to fix it. Anyone know wh...

How do I change an ASP.NET listbox border from 3d to 1px solid?

By default the listbox in ASP.NET has a 3D border effect. I need to change that to Solid, 1 px, some color. Can this be done using css? Thanks, Atul ...

Regarding gridview

hi guys, I have a gridview in which when i click edit,update and cancel button comes.I have a variable named status.If status=false Then update should change to insert anf if status=true then update should be update itself.What code i hve to write in rowcammand for this? <asp:TemplateField > <ItemTemplate> ...

GridView SelectedRowStyle not applied to row selected in code

On pageIndexChanged, I set the first row in the grid to be selected, as follows: //I'd love to get rid of this, but the SelectedDataKey is empty otherwise Grid.DataBind(); Grid.SelectedIndex = 0; Grid.Rows[0].RowState = DataControlRowState.Selected; The row is selected, but the SelectedRowStyle is not applied. Even if I reset it,...

How can I determine the memory footprint of a session variable?

Also, web.config - please explain. <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="120"/> We are using inproc mode and we used the 20 session variable in our web application. We need to know each variables Occupyin...

Tools for searching string literals in an application

Are there any tools for locating all the strings that I've to Internationalize? My app is already "partially" designed for Internationalization support. However I want to make sure that there arent' any hardcoded string within my app. Regular expression search didn't help a lot as trying to find "***" returns every aspx page. Are there...

How to Change the URL without doing any Server Trip

I want to change the URL (QueryString Data) after the Page gets Displayed. How can i do it ? ...

How would you code Gmail's "Labels" text searchable checkbox list selection drop down control in ASP.NET/Ajax/JQuery?

I imagine having to interact with Gmail is a necessity for most programmers. Gmail's control for associating labels to emails is monumentally effective UI behavior. For those unfamiliar with the behavior, it's basically a button-initiated pop up panel (drop down UI effect) containing: 1) a text entry box 2) scrollable multi-checkbox li...

RedirectToAction - but I want it to go to http://site.com/controller/action/id?

I'd like to move an asp.net mvc response to http://site.com/emails/list/[email protected] Using RedirectToAction("list", "emails", new { id = "[email protected]"}); takes you to http://site.com/emails/[email protected]. What am I doing wrong? Thanks, Rob ...