473,378 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

am gettin specific cast not alowed error an anybody help

string Empid = e.Item.Cells[1].Text;
string Empname = ((TextBox)e.Item.Cells[2].Controls[0]).Text;
string date = ((TextBox)e.Item.Cells[3].Controls[0]).Text;
string Special=((TextBox)e.Item.Cells[4].Controls[0]).Text;
string Sex=((TextBox)e.Item.Cells[5].Controls[0]).Text;



am getting Specified cast is not valid.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Specified cast is not valid.

Source Error:


Line 236: string date = ((TextBox)e.Item.Cells[3].Controls[0]).Text;
Line 237: string Special=((TextBox)e.Item.Cells[4].Controls[0]).Text;
Line 238: string Sex=((TextBox)e.Item.Cells[5].Controls[0]).Text;
Line 239:
Line 240: //DateTime dt= String.Format("{0:d}", date);
Mar 16 '07 #1
0 921

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Simon Ford | last post by:
Hi All, I'm having trouble understanding exactly how I can do some specific implicit casting. There are two problems here; does anyone know what I should be doing? //---------- // (1)...
1
by: eSapient | last post by:
I get the following error when I run the XML Schema Definition Tool on a XML schema: Error: Error generating classes for schema 'codeGeoFeatureType'. - Specified cast is not valid. The XSD...
1
by: Ben Harper | last post by:
I define an interface in managed C++: I call it ISgPlugin. I implement that interface in a C# dll: Using reflection, I try to load and instantiate that interface from the C++ module. I get far,...
2
by: Fabian | last post by:
Hi, I work with asp.net 2.0 and I have a intermittent error, only happens a few times a day. In the page I evaluate a Query String and then I get data form a database. The code snipped: ...
10
by: PH | last post by:
Hi guys! I need to get the remote EndPoint from when I receive packets when listening in a local port in my computer. I'm using UDP (connection-less) so I only bind the socket to my...
2
by: amit | last post by:
Hi guys I am trying to use Access Database with VB .net. In the stock database I have Fields Code and DrugName; Data Type of both is Text. In the following code line marked with *** gives the...
2
by: prasanth1802 | last post by:
string Empid = e.Item.Cells.Text; string Empname = ((TextBox)e.Item.Cells.Controls).Text; string date = ((TextBox)e.Item.Cells.Controls).Text; string...
11
by: Dinsdale | last post by:
I am trying to determine what the current cast of an object is. Essentially, if I use GetType, it always returns the original type of the object created but I want to know what the current cast of...
1
by: RYKLOU | last post by:
I am kinda new to php, but i do know what i am doing kinda, but i came across this error when i am trying to upload a file to my website. Fatal error: Allowed memory size of 8388608 bytes...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.