Home » 2012 (Page 13)

Archive for 2012

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

Link to network files

Ever wanted to access network files from your webpage? Here is how to create the link: <a target=”_blank” href=”file:///D:/MyCompanyShare/MyDoc.docx”>View</a>

404.2 The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server

By default IIS 7 does not allow ISAPI and CGI through .Net 1.1. So if you are working with older code on IIS 7 you will need to follow these steps to resolve the issue: 1. Open IIS and click the server name 2. Double click “ISAPI and CGI Restrictions” 3. Right click ASP.NET v1.1 […]