webforms

Why is ASP.NET changing the form action paramter?

I have an odd problem. I have a page called search.aspx. When the search button is clicked, the user is supposed to be redirected to another website. The redirection code is in one of the postback events. Here is the form code: <form id="form1" runat="server" onsubmit="return CheckSearchBox();" action="http://mysearch.company.com/...

ASP.NET WebForms with MVC localization issue

I have a mixed project: WebForms with ASP.NET MVC2 and is running OK. I have done this tutorial on separate MVC Project and localization is working fine. However, when I want to apply localization (mentioned above) in my mixed project, it seems to be ignored. It doesn't matter what I set in global.asax file (de-DE, fr-FR, pl-PL) always ...

Why the template for a webform got a different behavior than the IDE?

If you open this zip file C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\VisualBasic\Web\1033\WebForm.zip in this file Default.aspx.vb you will see this code Public Partial Class $classname$ Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) H...

Iterating through Returned jQuery Data

Hi All, I have a form which I'm using jQuery to post and working to handle the return data. I currently have the following : $.ajax({ type: 'POST', url: '/', data: $("#register_member_form").serialize(), success: function(data){ if (data.search(/error/) >= 0) { var err = "There were errors found...

DataGrid/GridView will not render THeader and TBody

I'm using a GridView and DataGrid. To use some JQuery I'm trying to get to work it needs to render the THeader and TBody. How do I force the DataGrid and GridView to render these elements? ...

List All Update Panels ClientID In Webform Page

Anyone know of a way to read out in a list all of the UpdatePanel Client ID's I have on a page? Basically I need to loop through all controls in the page with a type of UpdatePanel, and display the ClientID for each.. I have four update panels on this page and I am using this private string LoopUpdatePanel(ControlCollection c...

PHP: Having trouble uploading large files

I am doing a file upload using PHP, which works fine for a file of size 2.8MB on my localhost - but not my Mediatemple GS host. Files smaller than 2MB work fine, but anything larger seems to not work... I am not getting any error message but when the upload finishes, the file is not found in the uploads directory... I googled around, an...

Best way of handling javascript within Custom Controls?

In ASP.Net I have a few custom controls I've made. I utilized jQuery where it helped also. Well, one problem I have now(with obvious, but "bad" workarounds) is that for each user control I need to execute some code from within pageLoad($(document).ready will not work with update panels). Well so now my problem. I need to have two custo...

authentication cookie

Using Asp.Net MVC 1, I have my "log on" control/page...I check the "remember me" checkbox and hit submit.. in my controller I have: FormsAuth.SignIn(userName, password, rememberMe) This method creates the persisted cookie .ASPXAUTH and everything is good at this point.. I put a breakpoint in other controller, and I noticed that once I...

getElementsByClassName not working

I coded a php page that displays information from a mysql database neatly into tables. I would like to hide empty table rows with an onLoad event handler. Here is a sample table with code that hides a <td> when it has no content. but i can only get it to work with different IDs: <script type="text/javascript"> function ...

Forcing ASP.NET WebForms to render __doPostback() scripts

One of our ASP.NET WebForms 3.5 pages just suddenly decided not to render the __doPostBack() javascript method, along with the supporting <hidden> fields, anymore. Everything else seems OK on the page - the only thing I changed was that I removed a postback handler on a SelectList control, and changed AutoPostback from True to False on ...

Fire a method execution after x seconds in code behind - ASP.NET/C#

After x seconds, after the page loads, I need to execute a method in the code behind. I cannot move this logic into JS. Do I need to use delegates/events for this? Can anyone give me an example (preferably with a code snippet)?? ...

Primary keys on webforms (load initially or on save) ?

This is just a general question irrespective of database architecture. I am maintaining an ASP.NET web application. The structure is such that, Say on 'Add a new employee' webform The primary key (or the record id to be saved with) is initially loaded on form load event & displayed as a label So when the form loads, the record id to ...

Designing all pages completely in the codebehind?

Our current web portal at work was a port from a classic ASP codebase. Currently, all pages in our project extend a custom Page class called PortalPage. It handles login/logout, provides access to a public User object for the currently authenticated user, and adds the standard page header and footer to all of our pages. Every Page in ou...

Exception when databinding a recently created Entity Framework object.

This possibly could be un-related to databinding or entity framework. But this is the scenario my problem is occurring in. This is my code, saving a new entity and then re-binding: Run run = new Run(); run.Distance = 111; rc.RunSet.AddObject(run); rc.SaveChanges(); GridViewRuns.DataSource = rc.RunSet.ToList(); GridViewRuns.DataBind()...

Complex page layout and design

I have a page that has a around 30 links divided among 6 groups. Boat a b c Horses d e ... etc When the user clicks the link the page will display a series of controls (dropdown, htmltable, chart) in a layout specific only to the link that was clicked. I have a few ideas: Create separate aspx pages for each link that share...

Change Default "Default.aspx" to "Index.aspx" on Visual Studio 2010

Whenever I create a new Web Form on Visual Studio 2010, the default name is always "Default.aspx". This is a slight pain as I'm having to change it to "Index.aspx" each time. How can I change this so that "Index.aspx" is the default name? Thanks. ...

Calendar Control: Have todays date selected on page load

I have a calendar control on a asp .net webform. In the Pag_Load event I have this.CalendarReportDay.SelectedDate = DateTime.Now; Which sets the Calendar's Selected Date but todays date is not highlighted on the calendar. Does anyone know how to get todays date to be selected? ...

Is it possible to accept data through multiple forms in wordpress?

Hi All, A client developed an entertainment website using Wordpress as the back end. He wants to be able to have users enter data into two different forms; one form for users to enter events and another form for users to enter entertainment venue information. Has anyone solved this before? What's the correct design pattern for this? ...

Foreign Keys in ASP.NET Data Controls

I have been using LINQ with ASP.NET to build some quick and simple maintenance forms using detailsview component. However it gets more difficult when you have to insert/maintain foreign keys. I managed to make to work following ScotGu's tutorial with a dropdownlist or textboxes and a second LINQ data component to display meaningful infor...