Home » Applications » ASP.NET » Archive by category "Controls" (Page 5)

Archive for the 'Controls' Category

DefaultValue of parameter – alternative method of setting parameter’s value

Set update parameter default value in code behind: Formview …. Meeting Time: <asp:textbox ID=”TimeTextBox” runat=”server” Text=’< %# Bind("Time") %>‘ /> … <updateparameters> <asp:parameter Name=”Time” Type=”String” /> <asp:parameter Name=”Rid” Type=”Int32″ /> </updateparameters> </asp:textbox> Code behind Protected Sub MemberDetailFV_ItemUpdating(ByVal sender As Object, ByVal_ e As System.Web.UI.WebControls.FormViewUpdateEventArgs)_ Handles MemberDetailFV.ItemUpdating_ MemberDetailDS.UpdateParameters(“Time”).DefaultValue = Now() End Sub

VB.NET – Limited user (checkbox) selection

I found this script very helpful while designing surveys for my organization. This post applies to: – MS SQL server 2005+ – VB.NET – VS2010 – .NET 4.0 Framework Javascript code <asp:content ID=”Content1″ ContentPlaceHolderID=”HeadContent” Runat=”Server”> <script type=”text/javascript” language=”javascript”> function CheckCheck() { var chkBoxList = document.getElementById(‘< %=CheckBoxList1.ClientID %>’); var chkBoxCount = chkBoxList.getElementsByTagName(“input”); var btn = document.getElementById(‘< […]