Wednesday, November 27, 2013

Virtual Paths not working in Response.Redirect ASP.NET


Usually when we use Response.Redirect() method to redirect to a webpage or folder this works fine if both webpage i.e. current and the requested one are on the same level/folder


the '~' sign means the application's root level

so now from application root level we can define the path

Additionally you can use Response.WriteFile() method

Wednesday, November 13, 2013


          In this tutorial I will show you how can you install and play with bots in your counter strike.
Thing you will need

Podbot (Download from HERE)
file is password protected, password is 'taqi'

1. After download Podbot extract it, there you will find 4 folders and a .gam file

2. Copy all 4 folders and the .gam file

3. Paste it in your cstrike folder
for me the path is c:\program files\valve\cstrike\

You will be warned about file replacing, just click on Yes to All

And you are done, you have successfully installed Bots in your counter strike

To check if PodBot is installed successfully

1. Run hlds

2. Make a server

3. Now go to console tab and type meta list , and you should find the line below

As you can see POD-Bot is installed

I hope this was informative for you, and I would like to thank you for reading

Friday, November 8, 2013

How To Find Physical Path In ASP.NET

Following are some properties through which we can find physical path of our ASP.NET Web Application

  • string path1 = HttpContext.Current.Request.PhysicalApplicationPath;
  • string path = Server.MapPath("/");
  • string path2 = Server.MapPath("~");
  • string path4 = AppDomain.CurrentDomain.BaseDirectory;
I Hope it was informative for you, and I would like to Thank You for reading

jQuery not firing in Content Page derived from Master Page

If Your jquery is not working in Content Page i.e. Web form using Master page than try the following

usually we get DOM by $("#ControlName")

The above method should work properly when the web form is not derived from Master Page

But when the page is derived from Master Page all controls id's are changed hence the above method will not find reference of the control

Now in order to find correct reference we should do something like this

 var reference = $("#<%=controlName.ClientID %>")

This way we can get the reference and assign it to a variable

Now using variable we can work on the control like we usually do it jquery

I hope it was informative for you, and I would like to Thank you for reading

Wednesday, November 6, 2013

How To Hide Certain Column in datagridview C#

In order to hide certain column of datagridview, do something like this

dataGridView1.Columns[4].Visible = false;
  • where dataGridView1 is the name of your datagridview
  • Column starts from index 0 
You can hide multiple columns just change the index number

I hope it was informative for you, and I would like to Thank you for reading

Tuesday, November 5, 2013

How To Pass Array to a Web Method or Web Service Method

In this tutorial I will show you how to pass an array to a Method this can also work for web service method as well.

1. First we need to define a array and it some data in it

   1:              string[] array = new string[20];
   2:              for (int i = 0; i < 4; i++)
   3:              {
   4:                  array[i] = "This is number " + i;
   5:              }
Here I have define an array of type string, this can be of other type as well.

2. Now we will create a method that will accept a array of type string as a parameter

   1:  public void compressFiles(string[] objlistt)
   2:          {
   3:                  for (int i = 0; i <objlistt.Length; i++)
   4:                  {
   5:                  // your code here
   6:                  }
   7:          }
3. Now to send the array to the method, you will need to call that method like this

   1:  compressFiles(array);
I hope it was informative for you, and I would like to thank you for reading

How To Fix Apache Server No Service Installed


 If you have encounter an error while installing Apache Server like below, than you are at the right place, in this tutorial I will tell you why these error occur and what does these error means.

  • The First error window means that something is interfering with port 80 and it is not letting Apache Server to use this port.
In my case the problem was with the IIS, IIS was already installed on my machine now because it was using the port 80 that's why Apache gave error that it cannot bind the port 80.
  • The Second error window state that after installing Apache, the system could not find service called "Apache2"
In our case because it couldn't bind the port 80, so it didn't register the service

So what is the solution ?? you have 2 options.

1. Disable IIS service (Click to find How)


2. Change your website port to something else in IIS (Click to find How)

If you have any further queries, than please do comment.


Monday, November 4, 2013

How To Disable IIS Service

          In this tutorial I will show you how to Disable IIS Service.

1. Click on Start Menu and than Click on Run

2. Type services.msc and click on OK

3. Now find service called IIS Admin Service, right click on the service and click on Stop

You will receive a warning message like above because

  • World Wide Web Publishing Service
  • Windows Remote Management (WS-Management)
All these 3 services are dependent on IIS, so if you stop IIS these services will be stop as well

4. Click on Yes

Keep in mind that, IIS will start again next time when you start your windows, to keep it disable for future you would need to right click on IIS Admin Service and click on properties, than from there change the start-up type to Disable.

That's it you have successfully disabled IIS.

If you have further queries please don't hesitate to comment.