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 394 posted 12 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 424 posted 12 years ago by jink
Call with the path of any javascript you want to load into the HEAD of the ASPX page.
1 455 posted 12 years ago by jink
Returns the postback sender ID. This is usually a button ID from a form that caused a post back.
0 372 posted 12 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 505 posted 12 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 406 posted 12 years ago by jink
Replace *SERVERNAME* with the name of the server name in the web.config
2 340 posted 12 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 312 posted 12 years ago by jink
After postback
0 294 posted 12 years ago by tshortt
usage: SomeDropDownList.Set("Some String Value");
1 357 posted 12 years ago by naspinski
0 226 posted 12 years ago by Elph
View version with full names here: [Dropdown-states](http://snipplr.com/view/4042/dropdown-states/ "View full names version")
3 546 posted 13 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 464 posted 13 years ago by dreamlusion
How to use WebClient to post to an ASP.Net page and maintain viewstate for proxy purposes.
0 339 posted 13 years ago by BlueCockatoo
Put at beginning of system.web tags
0 227 posted 13 years ago by czapata
This is a code example which demonstrates how to send Email with attachment using your GMAIL Account.
6 567 posted 13 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 604 posted 13 years ago by rengber