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.

Sunday, March 11, 2012

.net - can not connect to oracle server via my web hosting..

Problem
.net - can not connect to oracle server via my web hosting..

Impact
Can't fetch any data from the server and on the webpage it shows an error.

Solution
oracle support was deprecated by the Microsoft.
so what we use on our local machine is the oracle support for the .net
as it is the third party add-on so no hosting company provides oracle support as it may be unsafe.
so to have oracle support you must buy an dedicated server then your hosting company will do anything that you tell them to do and will install all your add-on.
but if you still want to use oracle on your shared hosting you can but you need to have permission to have trustlevel "full" over the server. and then if you have that you can upload dlls for oracle in to your bin folder and your web.config file should point to these dlls.
Working with these dlls will be quite tricky as there are  7 dlls that you need to upload on the server and still it doesn't support some functionality like ADDWITHVALUE function for parameters.
 and you will face some problem while working with int parameter.
but the way is to use for that is don't use parameters and build a query using sting and it is really unsafe to and easy to hack.

.net - repeter - can not see updated records after inserting a new record

Language--> C#, asp.net
Framework -> .net Framework 4.0
Problem-

can not see updated records after inserting a new record
Impact-
Users Can not see new records and inserts multiple records
Solution--
After successful insertion of record you need to rebind the repeater or any other data-bound controls.
And you must see all the new data inserted by the user.
And not only after inserting after each SQL statement  you fire on database. you Must rebind your control.

Kohana- Can not find specified Class

Language - PHP
Framework - Kohana

Problem - Can not find specified class.


Impact -
can not call needed class.

Solution -
Kohana supports vary rigid file system
so if your classname is Controller_Dummy_Demo
then your class must be under this path controller/dummy/demo.php
and  your class name should also be using "_" and first letter of each word must be capital