Home » Posts tagged "content"

Archive for the 'content' Tag

Read the content of the folder – VB.NET

<%@ Page Language=”VB” %> <%@ Import Namespace=”System” %> <%@ Import Namespace=”System.IO” %> <%@ Import Namespace=”System.IO.FileInfo” %> <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> <style type=”text/css”> ul { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; line-height: 25px; font-variant: normal; color: #0C4F93; text-indent: 5px; list-style-position: outside; list-style-type: square; } <script runat=”server”> Protected Sub Page_Load(ByVal […]

Content Limited by Word Count – VB.NET

Imports System.Text.RegularExpressions Partial Class for_sale_Default Inherits System.Web.UI.Page Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then Dim WordCountInt As Integer = CountWords(DataBinder.Eval(e.Row.DataItem, “description”).ToString) Dim WordCountStr As String = DataBinder.Eval(e.Row.DataItem, “description”).ToString If WordCountInt >= 40 Then Dim iNextSpace As Integer = WordCountStr.LastIndexOf(” “, 175) e.Row.Cells(3).Text = + DataBinder.Eval(e.Row.DataItem, “description”).ToString.Substring(0, iNextSpace) […]

Content Limited by Character Number – VB.NET

Code behind Partial Class _default Inherits System.Web.UI.Page Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then ‘character count If DataBinder.Eval(e.Row.DataItem, “description”).ToString.Length >= 175 Then e.Row.Cells(3).Text = + DataBinder.Eval(e.Row.DataItem, “description”).ToString.Substring(0, 175) + e.Row.Cells(3).ToolTip = DataBinder.Eval(e.Row.DataItem, “description”).ToString Else e.Row.Cells(3).Text = + DataBinder.Eval(e.Row.DataItem, “description”).ToString End If End If End Sub End Class