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
Archive for the 'ASP.NET' Tag
VB.NET – SQL statement “LIKE”
Input box Please enter customer first or last name: <asp:RequiredFieldValidator ID=”ReqSearchfor” runat=”server” ErrorMessage=”<font color=’red’>Input box can not be empty!</font>” ControlToValidate=”SearchFor” > <asp:TextBox ID=”SearchFor” runat=”server”> <asp:Button ID=”SearchBtn” runat=”server” Text=”Search” /> SQL DataSource Design <asp:SqlDataSource ID=”SearchResults” runat=”server” ConnectionString=”< %$ myConString %>” SelectCommand=”SELECT * FROM [CustomerTbl] WHERE ([customer_name] LIKE ‘%’ + @customer_name + ‘%’)” <SelectParameters> <asp:ControlParameter ControlID=”SearchFor” Name=”customer_name” […]
VB.NET – Single file upload
WUI View Home | Upload File | Close Window Enter requested information: Your name X File title: File category: ComedyPlease select…Sci-FiWild West File type: DivX Video FilePlease select…Windows movie videoAudio Video Interleave File Select a file to upload: Additional note: Designer view (expand) < %@ Import Namespace=”System.IO” %> < %@ Import Namespace=”System.Data.SqlClient” %> < %@ […]