Solved

How do I add a textbox to a datacolumn?

Posted on 2011-02-10
1
584 Views
Last Modified: 2012-05-11
I'm trying to add a datacolum of type textbox.  It errors on line 3 saying "Column requires a valid DataType."

1            // Notes
 2           dc = new DataColumn();
3            dc.DataType = Type.GetType("System.Web.UI.WebControls.TextBox");
4            dc.ColumnName = "Notes";
5            dtFiles.Columns.Add(dc);

Any ideas?
0
Comment
Question by:JT_SIRO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 15

Accepted Solution

by:
jorge_toriz earned 250 total points
ID: 34868293
You can't add a textBox as a DataColumn, because it doesn't make any sense, you can't hold TextBox data in a database... I think you should add a templated column in your FormView, GridView or DetailsView control that, I suppose, you are using.
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question