Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > .NET > ASP.NET

ASP.NET - Page 4

61-80 of 99     Previous     Next
Create Rollover Graphics in ASPX Pages
by David Derf
This tip shows you how to create rollover graphics in .aspx pages using the ASP.NET Hyperlink Web UI control.
Check All CheckBoxes in an ASP.NET DataGrid Using a Single CheckBox
by Greg Dobbs
Debug an ASP Project with Visual Studio .NET in Windows 2000
by Timm Rebitzki
ShowMessageBox - Showing a client-side message box at the next page load
by Marco Bellinaso
Show a client-side message box at the next page load Example: ShowMessageBox(Me, "Order successfully submitted!")
GetPostbackControl - Return a reference to the control that caused the last postback
by Marco Bellinaso
Return a reference to the control that caused the last postback, even from the Page_Load event! It requires in input a reference to the posted-back page (this is necessary if you want to be able to move this function in a separate class instead of in a page's codebehind class Example:
Input validation in ASP.NET 1.1
by Marco Bellinaso
ASP.NET 1.1 automatically validates input posted to the server against a list of potentially dangerous strings (the values are hard-coded, unfortunately, it would have been nice to be able to edit this list). For example, by default it prevents the user to submit text that contains ...
Persistent session state
by Marco Bellinaso
In ASP.NET 1.0 you have the option to maintain the session state on an external process, in SQL Server, by setting the mode attribute of the sessionState tag in web.config to SQLServer. The problem is that the data is stored in the SQL Server's Temp database, and thus the ...
Dynamically moving a server control
by Marco Bellinaso
Dynamically moving a server control instance on the page is very easy, thanks to the possibility to add any style attribute to the control. In this case, you can dynamically add the control's LEFT and TOP coordinates, and another attribute that says you want to use DHTML's absolute positioning. ...
IsLanguageSupported - Detecting whether a language is supported by the browser
by Marco Bellinaso
Returns a Boolean value indicating whether the specified language is supported by the client browser. The language string can specify also a sub-language or a country, e.g. fr-CA to identify the Canadian French, or it can just be fr for general French. The second parameter specify whether ...
BuildUrlWithQueryString - Building an Url with a list of parameters in the querystring
by Marco Bellinaso
This function takes in input a base url and an array of parameter names and values (in the form: param1, value1, param2, value2, etc.), and returns the final url with all the parameters in the querystring Example: Dim url As String = BuildUrlWithQueryString("Test.aspx", "Param1", "Value1",
Creating a popup calendar control
by Marco Bellinaso
Many data entry forms have one or more text fields that the user should fill with a date value. Many sites have a button near these fields that when clicked pops up a new small window with a calendar, to help the user select the date. When the user clicks on a day (rendered as a hyperlink), ...
Disabling the session state to improve performances
by Marco Bellinaso
Sessions management consumes server's resources and memory, thus, if you don't use them in your application, you should disable them to improve performances. You can disable sessions for the entire application by setting to False the mode attribute in the web.config's &l
Creating a default button for the page
by Marco Bellinaso
It is usual for a web form to have more than one button control. How can you set the default button that should submit the form and raise its Click event on the server when the enter key is pressed on the form? The textbox and the other input controls don't have a property that allow you to ...
Creating multi-steps input forms
by Marco Bellinaso
In a typical user registration form, you may ask for quite a lot of data, such as the first and last name, full address, phone and fax numbers, e-mail address, newsletters subscriptions and other data for the site personalization. All this data shouldn't the asked in a single step, because a ...
Passing values from a page to another by means of the Context object
by Marco Bellinaso
Sometimes you may want to gather the user input with a page, and process it in a different page. As you know, ASP.NET web forms can post only to themselves, so you can't just change the form's <i>action</i> attribute and make the form post to a different page. And anyway, you may ...
Uploading a file on the server
by Marco Bellinaso
Uploading a file from the client to the server is very straightforward with ASP.NET. Just use the <input type="file" runat="server"> tag and its wrapper class HtmlInputFile. Here's how you define the control on the page:
Using static variables instead of the Application object
by Marco Bellinaso
If you want to share a value or an object instance between all the pages of any session, you typically use the Application object. However, a good alternative is to use a public variable defined in a module (VB.NET only), or a static field/property defined in a class. Static properties maintain ...
AppException - An extended Exception class that logs the errors to file
by Kevin Hoffman
This class extends the base Exception class with a static method (callable also without creating and throwing an instance of this exception class) to log the contents of the exception to a file. Notes: A custom key named ErrorLogFile must be added to the section, within the section, to ...
Redirecting to the real referrer page during a postback
by Marco Bellinaso
Say that you have a page loaded from another page, and that in this page you have a "Save and Return" button that does something and returns to the previous page. For example you may have an Orders page that loads a Details page, where you make some changes and press the button to save the ...
GetWebConfigCustomKeyValue - Return and cache a custom key's value from Web.Config
by Marco Bellinaso
Return the value of the specified custom key, stored in the Web.Config file. If the value has been already requested before, the function returns its cached value. The second optional parameter is the path of the Web.Config file where this custom key is stored, and it is necessary to add a ...
61-80 of 99     Previous     Next
Sitemap