3
Answers

server error after hosting

my wesite working perfictly on localhost when i uploaded it on server i get this error
 
Server Error in '/' Application.
 
Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
 
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
 
<!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration>
 
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
 
<!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration>
 
and its redirect to index page in webconfig i stooped custom error
Answers (3)
2
Midhun T P

Midhun T P

NA 19.7k 281.1k 8y
Hi,<br><br> Do you need to validate a row or column?<br> You can convert to int as below-<br> Convert.ToInt32(dt.Rows[0]["colname"].ToString())>0
Accepted
1
Kishore Chowdary

Kishore Chowdary

NA 12.7k 254.9k 8y
use the string conversion code. the code is as follows
consider it as follows.
int a;
a=Console.ReadLine(int.Parse());
1
Raja

Raja

NA 1.7k 45.2k 8y
1
Pradeep Shet

Pradeep Shet

NA 6.3k 2.1m 8y
hi raja,
This is what you were looknig for?
foreach(DataRow dr in dt.Rows)
{
if(Convert.ToInt32(dr["colname"])>0)
{
//do something
}
}
1
Delpin Susai Raj

Delpin Susai Raj

NA 32k 1m 8y
http://stackoverflow.com/questions/1019793/how-can-i-convert-string-to-int
1
Krishna Rajput Singh

Krishna Rajput Singh

NA 5.5k 2m 8y
Hello Raja thank you for writing below links helpful for your question...........:)
and please clear your question first.....if you not looking that
https://msdn.microsoft.com/en-IN/library/bb397679.aspx
http://stackoverflow.com/questions/1019793/how-can-i-convert-string-to-int
http://sqlserverplanet.com/tsql/convert-text-string-to-numbers-int