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 534 posted 13 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 560 posted 13 years ago by jink
Call with the path of any javascript you want to load into the HEAD of the ASPX page.
1 620 posted 13 years ago by jink
Returns the postback sender ID. This is usually a button ID from a form that caused a post back.
0 506 posted 13 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 644 posted 13 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 523 posted 13 years ago by jink
Replace *SERVERNAME* with the name of the server name in the web.config
2 458 posted 13 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 424 posted 13 years ago by jink
After postback
0 377 posted 13 years ago by tshortt
usage: SomeDropDownList.Set("Some String Value");
1 470 posted 13 years ago by naspinski
0 295 posted 13 years ago by Elph
View version with full names here: [Dropdown-states](http://snipplr.com/view/4042/dropdown-states/ "View full names version")
3 730 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 590 posted 14 years ago by dreamlusion
How to use WebClient to post to an ASP.Net page and maintain viewstate for proxy purposes.
0 458 posted 14 years ago by BlueCockatoo
Put at beginning of system.web tags
0 287 posted 14 years ago by czapata
This is a code example which demonstrates how to send Email with attachment using your GMAIL Account.
6 734 posted 14 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 798 posted 14 years ago by rengber