Google now allows Flash ads in adwords and adsense.
Maximum size allowed is Flash ads must be 50K.
That's very good because flash can increase CTR for publishers.
For flash no seperate tag is there it will be inplace of image means
image and flash will go random
September 02, 2006
August 20, 2006
Data Grid in Asp.net
Data Grid in dot net is a very useful component. You dont have to mix your code in html table to represent your date in table format. Sorting paging is also provided.
having very useful features
we just bind data and it automatically make table format.
Details in next post. I am getting late.
Regards
Raj
having very useful features
we just bind data and it automatically make table format.
Details in next post. I am getting late.
Regards
Raj
Labels:
dot-net
August 10, 2006
A project with an Output Type of Class Library cannot be started directly.
Problem:
A project with an Output Type of Class Library cannot be started directly.
In order to debug this project, go to the Debugging tab under Configuration Settings in Project Properties, and set the Start Action to Start External Program or Start URL. Alternatively, you can add a non-library project to this solution that uses a reference to this project and set it as the startup project.
Category: Visual Studio
Solution: A libray project can't be a startup project becoz it does not contain aspx page.
Problem is you have selected start up project a library project so when you run project vs try to run a libary which can not be run. So to remove this problem right click on the website-project under your solution and select "Set as startup project" now press f5 visual studio will not show you error now. for further query comment below.
A project with an Output Type of Class Library cannot be started directly.
In order to debug this project, go to the Debugging tab under Configuration Settings in Project Properties, and set the Start Action to Start External Program or Start URL. Alternatively, you can add a non-library project to this solution that uses a reference to this project and set it as the startup project.
Category: Visual Studio
Solution: A libray project can't be a startup project becoz it does not contain aspx page.
Problem is you have selected start up project a library project so when you run project vs try to run a libary which can not be run. So to remove this problem right click on the website-project under your solution and select "Set as startup project" now press f5 visual studio will not show you error now. for further query comment below.
Labels:
dot-net
August 07, 2006
Exception Handling C#
Topic:
Exception Handling. Exception are common in programs like dividebyzero, nullreference, tns: timeout
What is exception handling:
Exception handling is structural way of handling the errors and exception.
How to use:
Exception are handled in C# using try, catch, finally optional is throw. The code that can throw exception is inserted in try block
try
{
int var=0;
int var2=10;
var=10/var;
}
Catch(dividebyzeroexception ex)
{
//do appropriate action
var=0;
}
finally
{
//any connection close etc//
file close etc.
}
Catch block handled the exception you can do appropriate action when exception occur.
finally will exceute always whether exception occur or not.
so always place code that must exceute. like connection close;
whether exception occur or not we must close the connection.
possible blocks are:
try{
//code
}
catch{
//code
}
finally{
//c sharp code
}
--------------------
try{
}
catch(OracleException ex)
{
//c# code,
}
catch(NullReferenceException ex)
{
//code: re throw with inner exception or message
throw ex;
}
catch(Exception ex)
{
throw new Exception("sql server insertion error",ex);
}
//Here Exception is catch at last because it is parent class of all the exception classes. so if any child parent relation ship exists between any of the exception, child will be catch above the parent.
Exception: because it is base class of every class. because it will catch all the exception if placed first and code not reachable compiler error will be there.
Example
so if you have Arithmatic Exception and dividebyzero exception place dividebyzero
first then arithmatic exception. coz arithmatic will catch all the error related to mathematic calculations
try and finally can co-exist without catch block but only one finally can be there
try{}
finally{}
//Following is error
try{}
finally{}
{} finally
{}//error
Caution:
finally block will execute in both cases whether exception occurs or not.
and finally always executes.
for example if you put "return;" keyword in the try or catch, it will not create any problem in execution path, and code in finally will execute
You can post comments if any query is there.
Exception Handling. Exception are common in programs like dividebyzero, nullreference, tns: timeout
What is exception handling:
Exception handling is structural way of handling the errors and exception.
How to use:
Exception are handled in C# using try, catch, finally optional is throw. The code that can throw exception is inserted in try block
try
{
int var=0;
int var2=10;
var=10/var;
}
Catch(dividebyzeroexception ex)
{
//do appropriate action
var=0;
}
finally
{
//any connection close etc//
file close etc.
}
Catch block handled the exception you can do appropriate action when exception occur.
finally will exceute always whether exception occur or not.
so always place code that must exceute. like connection close;
whether exception occur or not we must close the connection.
possible blocks are:
try{
//code
}
catch{
//code
}
finally{
//c sharp code
}
--------------------
try{
}
catch(OracleException ex)
{
//c# code,
}
catch(NullReferenceException ex)
{
//code: re throw with inner exception or message
throw ex;
}
catch(Exception ex)
{
throw new Exception("sql server insertion error",ex);
}
//Here Exception is catch at last because it is parent class of all the exception classes. so if any child parent relation ship exists between any of the exception, child will be catch above the parent.
Exception: because it is base class of every class. because it will catch all the exception if placed first and code not reachable compiler error will be there.
Example
so if you have Arithmatic Exception and dividebyzero exception place dividebyzero
first then arithmatic exception. coz arithmatic will catch all the error related to mathematic calculations
try and finally can co-exist without catch block but only one finally can be there
try{}
finally{}
//Following is error
try{}
finally{}
{} finally
{}//error
Caution:
finally block will execute in both cases whether exception occurs or not.
and finally always executes.
for example if you put "return;" keyword in the try or catch, it will not create any problem in execution path, and code in finally will execute
You can post comments if any query is there.
Labels:
dot-net