Welcome To Snipplr


Everyone's Recent Snippets Tagged aspnet



Bind the DropDownList like normal (set DataSourceID, DataTextField, DataValueField), and <%BIND%> the SelectedValue field. AutoPostBack should be enabled. In the OnSelectedIndexChanged:
0 761 posted 14 years ago by jink
Use this code to pull a DotNetNuke URL from a tab name. We use this to replace "?tabname=blah" type URLs which do NOT transfer language info.
0 814 posted 14 years ago by jink
Call with the path of any javascript you want to load into the HEAD of the ASPX page.
1 969 posted 14 years ago by jink
Returns the postback sender ID. This is usually a button ID from a form that caused a post back.
0 698 posted 14 years ago by jink
## Markup ## _Using square [ ] brackets for compatibility with Snipplr comment form_ [asp:PlaceHolder ID="StuffHolder" runat="server" ] <p>Some stuff in here</p> [/asp:PlaceHolder] ## Code Behind ## HtmlAttr[] attribu...
1 996 posted 14 years ago by jasonseney
Call AddKeepAlive() in Page_Load of the page that needs it. Change the path to the correct keep alive page. Page should disable caching, like in second code snippet.
2 779 posted 14 years ago by jink
Replace *SERVERNAME* with the name of the server name in the web.config
2 690 posted 14 years ago by jink
Code snippet prevents caching of the page by setting http header values and a LAST MODIFIED header to prevent google from caching too long. This should go into the page load event.
1 649 posted 14 years ago by jink
After postback
0 574 posted 15 years ago by tshortt
usage: SomeDropDownList.Set("Some String Value");
1 711 posted 15 years ago by naspinski
0 467 posted 15 years ago by Elph
View version with full names here: [Dropdown-states](http://snipplr.com/view/4042/dropdown-states/ "View full names version")
3 1029 posted 15 years ago by jasonseney
To run this demo, you need to download and install the trial verson of ImgX Controls from [here](http://www.atalasoft.com/download/ImgX64.exe). You may also want to download a scanner emulator (TWAIN data source), such as _TWAIN WG sample source_ ava...
0 944 posted 15 years ago by dreamlusion
How to use WebClient to post to an ASP.Net page and maintain viewstate for proxy purposes.
0 695 posted 15 years ago by BlueCockatoo
Put at beginning of system.web tags
0 423 posted 15 years ago by czapata
This is a code example which demonstrates how to send Email with attachment using your GMAIL Account.
6 1104 posted 16 years ago by planetcall
Typically won't work if the ASP.Net service identity (in the machine.config ProcessModel section) is a local account.
1 1164 posted 16 years ago by rengber