About Me
Blog Archive
Friday, November 21, 2008
generating buttons dynamically and adding events to them in windows application
the following links tell u how to generate buttons dynamically,adding it to form ,writing events to dynamically generated buttons,and how to pass values from one form to another form.
i think it will be fine,helpfull.
http://www.dotnetcurry.com/ShowArticle.aspx?ID=100&AspxAutoDetectCookieSupport=1
http://www.c-sharpcorner.com/UploadFile/alindag/HowToPassValuesBetweenWindowsForms.htm02242006061520AM/HowToPassValuesBetweenWindowsForms.htm.aspx?ArticleID=519479e8-d064-44a1-84b1-5ffc033dbbf3
i think it will be fine,helpfull.
http://www.dotnetcurry.com/ShowArticle.aspx?ID=100&AspxAutoDetectCookieSupport=1
http://www.c-sharpcorner.com/UploadFile/alindag/HowToPassValuesBetweenWindowsForms.htm02242006061520AM/HowToPassValuesBetweenWindowsForms.htm.aspx?ArticleID=519479e8-d064-44a1-84b1-5ffc033dbbf3
Tuesday, November 18, 2008
passing multiple values from gridview is very easy
You can pass single/multiple query string using HyperLInkField
Pass data field name in DataNavigateUrlFields which you wnat to pass value in query stringex:
DataNavigateUrlFields=”subject,query”
here subject and query both are differenct data field those are comming from database.
and write the page name in DataNavigateUrlFormatString where you want to pass query string value.
ex:
DataNavigateUrlFormatString = “~/Pages/default.aspx?UserName={0}&GameTitle={1}”
Take hyperlink field like with this properties
Pass data field name in DataNavigateUrlFields which you wnat to pass value in query stringex:
DataNavigateUrlFields=”subject,query”
here subject and query both are differenct data field those are comming from database.
and write the page name in DataNavigateUrlFormatString where you want to pass query string value.
ex:
DataNavigateUrlFormatString = “~/Pages/default.aspx?UserName={0}&GameTitle={1}”
Take hyperlink field like with this properties
To split string in c#.net
1)
public static string[] SplitStringIntoLines(string input, int maxCharsPerLine)
{
string[] words = input.Split(" ".ToCharArray());
ArrayList lines = new ArrayList();
string curLine = "";
foreach (string w in words)
{
if ((w.Length + curLine.Length + 1) <= maxCharsPerLine)
{
curLine += " " + w;
}
else
{
lines.Add(curLine.Trim());
curLine = w;
}
}
lines.Add(curLine.Trim());
return (string[])lines.ToArray(typeof(string));
}
follow the link
http://msdotnetsupport.blogspot.com/2006/09/splitstringintolines-function-in-net.html
2)
Splitting string with delimiter
string s = TextBox1.Text;
string[] s1 = s.Split(new char[] { " " });
Console.WriteLine(s1[0]);
Console.WriteLine(s1[1]);
Splitting string with comma ,
string s = TextBox1.Text;
string[] s1 = s.Split(new char[] { "," });
Console.WriteLine(s1[0]);
Console.WriteLine(s1[1]);
Splitting string with &
string s = TextBox1.Text;
string[] s1 = s.Split(new char[] { "&" });
Console.WriteLine(s1[0]);
Console.WriteLine(s1[1]);
Splitting string with string
string s = TextBox1.Text;
string[] s1 = s.Split(new string[] { "and" },StringSplitOptions.None); Console.WriteLine(s1[0]);
Console.WriteLine(s1[1]);
public static string[] SplitStringIntoLines(string input, int maxCharsPerLine)
{
string[] words = input.Split(" ".ToCharArray());
ArrayList lines = new ArrayList();
string curLine = "";
foreach (string w in words)
{
if ((w.Length + curLine.Length + 1) <= maxCharsPerLine)
{
curLine += " " + w;
}
else
{
lines.Add(curLine.Trim());
curLine = w;
}
}
lines.Add(curLine.Trim());
return (string[])lines.ToArray(typeof(string));
}
follow the link
http://msdotnetsupport.blogspot.com/2006/09/splitstringintolines-function-in-net.html
2)
Splitting string with delimiter
string s = TextBox1.Text;
string[] s1 = s.Split(new char[] { " " });
Console.WriteLine(s1[0]);
Console.WriteLine(s1[1]);
Splitting string with comma ,
string s = TextBox1.Text;
string[] s1 = s.Split(new char[] { "," });
Console.WriteLine(s1[0]);
Console.WriteLine(s1[1]);
Splitting string with &
string s = TextBox1.Text;
string[] s1 = s.Split(new char[] { "&" });
Console.WriteLine(s1[0]);
Console.WriteLine(s1[1]);
Splitting string with string
string s = TextBox1.Text;
string[] s1 = s.Split(new string[] { "and" },StringSplitOptions.None); Console.WriteLine(s1[0]);
Console.WriteLine(s1[1]);
code for taking print a page using javascipt
In the first page
here the page is which u would like to navigate to
In second page take a button
follow the link , it will helpful
http://www.beansoftware.com/ASP.NET-Tutorials/Printing-Reporting.aspx
here the page is which u would like to navigate to
In second page take a button
follow the link , it will helpful
http://www.beansoftware.com/ASP.NET-Tutorials/Printing-Reporting.aspx
Subscribe to:
Comments (Atom)

