Posts

Showing posts from August, 2012

like php

Image
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using System.Net; using System.Text.RegularExpressions; namespace FusionChartTest {     public partial class SiteMaster : System.Web.UI.MasterPage     {         protected void Page_Load(object sender, EventArgs e)         {             string current_file = Path.GetFileName(Request.Path);             System.Diagnostics.Debug.WriteLine("filename: " + current_file);             string[] lines = System.IO.File.ReadAllLines(Server.MapPath("~") + @"\sitemap.ini").Where(s => s.Trim() != string.Empty).ToArray();           ...

sitemap

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using System.Net; namespace FusionChartTest {     public partial class SiteMaster : System.Web.UI.MasterPage     {         protected void Page_Load(object sender, EventArgs e)         {             string filename = Path.GetFileName(Request.Path);             System.Diagnostics.Debug.WriteLine("filename: " + filename);             string ClassWill = null;             string divClose = null;             //string inputString        ...

skip white space

string[] lines = System.IO.File.ReadAllLines(Server.MapPath("~") + @"\sitemap.ini").Where(s => s.Trim() != string.Empty).ToArray();

array loop

            ArrayList arr = new ArrayList();             arr.Add("2011-02");             arr.Add("2011-03");             arr.Add("2011-04");             arr.Add("2011-05");             arr.Add("2011-06");             arr.Add("2011-07");             arr.Add("2011-09");             arr.Add("2011-10");             arr.Add("2011-11");             arr.Add("2011-12");      ...

interect with item

using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; namespace testApp {     public partial class _Default : System.Web.UI.Page     {         protected void Page_Load(object sender, EventArgs e)         {             string filename = Path.GetFileName(Request.Path);             System.Diagnostics.Debug.WriteLine("filename: " + filename);             string inputString;             using (StreamReader streamReader = File.OpenText(Server.MapPath("~") + @"\menu.ini"))             {          ...

getting part of the string after a caracter happen

Content[0].Substring(Content[0].LastIndexOf('-') + 1);

find the match string position in c# asp.net

string position = "this is the text | finding the text"; int position = inputString.IndexOf("|");. position return the matched position. if not matched then it return -1 cheers..

read file content in c# asp.net

    protected void Page_Load(object sender, EventArgs e)     {         ReadTextFile();     }     void ReadTextFile()     {         string inputString;         using (StreamReader streamReader = File.OpenText(Server.MapPath("~") + @"\test.txt"))         {             inputString = streamReader.ReadLine();             while (inputString != null)             {                 Label1.Text += inputString + " ";                 inputString = streamReader.ReadLine(); ...

Anroid HelloWorld

Image
My First App @Anroid getting the project setup the project properties select the activity(i tries MasterDetailFlow but there need upgrade sdk!(i put the latest one..)) you have to be patient!!!!(first time i also waiting and waiting but didn't come, after a while it's come :) ).

get current page name in c# asp.net

            string filename = Path.GetFileName(Request.Path);             System.Diagnostics.Debug.WriteLine("filename: " + filename);