Sunday, April 1, 2012

Problem
can't use response.redirect in the class file stored in the app_code folder.

Impact
the class file doesn't recognize that function

Solution
you can not use that in the class file to d that you need to send some value to the code behind file and then from then according to the response you can use the URL(sting) to redirect.

C# loses variable's value on postback

Problem
C# loses variable's value on postback

Impact
can't get variable's value.

Solution
C# is executed on server and then it sends result to the client using HTTP protocol.
and as you may know HTTP protocol is a stateless protocol.
so after sending result to the client the server doesn't know what was the value of that variable on previous request.
so if you want to store that variables value then you can use session or viewstate or hidden field.
and you can get back that value upon postback.

JavaScript doesn't recognize the int type variable.

Problem
JavaScript doesn't recognize the int type variable.

Impact
Shows error while using int type data.

Solution
java script has no variable types.
all the variables are declared using var keyword
and in that you can store any type of data.
and even they can change their datatype during their life cycle.

JavaScript doesn't shows the full path of the select file

Problem
JavaScript doesn't shows the full path of the select file

Impact
can not get the full path of the selected file.

Solution:
if you are not getting full path of the selected file then probably you are using firefox.
because of the security reasons it doesn't stores the full path.
and just for your knowledge you never need full path.
the reason behind that is that if you want to upload a file on the server we need to use multipart/form-data ‎so it stores the entire file in the post array of submission.
so on the server side anyway you can get the file don't worry about the file path.

css takes footer to the left of the right side div.

Problem
css takes footer to the left of the right side div.

Impact
the footer shows up on the wrong place of the page.

Solution
if you are facing this problem you must be using float left on the right div.
so if you want to solve this problem just put clear:both in the css for your main container of your footer div.
and your problem will be solved.

php doesn't creates html tags...

Problem
php doesn't creates HTML tags...

Impact
The output is not perfect.

Solution
Whenever you want to create an HTML tags with the php script don't ever forget to echo out the string.
if you don't echo out the tag it will show you an error on the page.

and never try to echo out the php script because php doesn't recognize the php script that is in the echo and quotes.

.net can repeater not bind data with xml data source

Problem
.net can repeater not bind data with xml data source.

Impact
Can not see the data and we see the yellow screen of death.

Solution
You can not bind the data from an xml data source.
you need to use xpath instead of bind.