Adsence750x90

Monday, July 28, 2008

C# Trojen logic and tips - sample codes and download files

Now am going to explain one harmful Trojan. one C# Programmer can write this program. so didnt provide the source code of this program. in C#.net there is one namespace System.IO, with the help of mentioned namespace we can get all details of Directory structure and file name folder name etc of one system or one computer. you can get programming help for directory and drive details from MSDN.


How to Do?
just find all local drives and files then u delete all files in drive programmatically. this is most harmful. so dare to code and Debug.

Thursday, July 24, 2008

ExecuteReader: Connection property has not been initialized

i got some error "ExecuteReader: Connection property has not been initialized" when in my Programming, i use dll file for connecting Database. i dont like to waste my time when am in programming.so just search in google and find answer form forums.asp.net

http://forums.asp.net/t/855001.aspx please check this Link

Monday, July 14, 2008

How to Encode URL using JavaScript

Encoding URL using JavaScript

u can encode url in client side using JavaScript, by using escape function in JavaScript
for Example
between script tag alert(escape(string url));

in C# URL encoding and Decoding
for encode
Server.UrlEncode(strign url)

for decode
Server.UrlDecode(strign url)

Monday, July 7, 2008

Disable all previous date in calender in Asp.Net

Disable all previous date in calender control using ASP.NET C#

CE code for Disable previous date

protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if (e.Day.Date <= DateTime.Today.Date)
{
e.Day.IsSelectable = false;

}
}

How to pass query string in Asp.net

How to pass query string in asp.net

we can pass query messages from one page(WebForm) to another in asp.net. for example
there are two pages page1.aspx and page2.aspx we want to pass some string values to page2.aspx.
then we can write

C# code
Response.Redirect("page2.aspx?msg=Hello");

this msg is query string "Hello" is passed to page2.aspx.
how can we retire this message from page2.aspx?
we can write
C# code
if (Request.QueryString["msg"] != null)
{
string message = Request.QueryString["msg"];
Response.Write(message);
}

Friday, July 4, 2008

How to fill date,month and year in ASP.NET DropDownList

How to fill date,month and year in ASP.NET DropDownlList?

i am doing a party site now,so i want to use dropdownlist frequently an some pages. to avoid code repeating i wrote a separate class file to fill dropdownlist. in that class file the programmer just send three dropdownlist it returned with values.

Class File


public void FillYearMonthDayDropDown(DropDownList ddlDay, DropDownList ddlMonth, DropDownList ddlYear)
{
ddlDay.Items.Clear();
ddlMonth.Items.Clear();
ddlYear.Items.Clear();
ddlMonth.Items.Add("MONTH");
ddlDay.Items.Add("DAY");
ddlYear.Items.Add("YEAR");
for (int i = 1; i <= 12; i++) { ddlMonth.Items.Add(i.ToString()); } for (int i = 1; i <= 31; i++) { ddlDay.Items.Add(i.ToString()); } for (int i = Convert.ToInt32(DateTime.Now.Year-16); i > Convert.ToInt32(DateTime.Now.Year-80); i--)
{
ddlYear.Items.Add(i.ToString());
}
}

Thursday, July 3, 2008

Login failed for user NT AUTHORITY\NETWORK SERVICE

Login failed for user NT AUTHORITY\NETWORK SERVICE

Today i want to create a simple upload page in C# ASP.NET for my designer, Paul Mathew to simplify my work. he can insert file to Database (SQL SERVER 2005)without my help.
he noticed one error."Login failed for user 'NT AUTHORITY\NETWORK SERVICE'" i never get this time of error when i create web page i, i search in Google to find intimidate remedy for this problem. i get from this link http://forums.asp.net/p/258484/2203642.aspx

to avoid this problem you can add in one line of code