Dear Friend, I am working on GridView in c#. Getting a problem on dynamic add html in a GridView Columns. How can I make a dynamic template by coding??? Many thanks. DataTable dt = new DataTable(); dt.Columns.Add("Id", Type.GetType("System.Int32")); dt.Columns.Add("Detail", Type.GetType("System.String")); dr = dt.NewRow(); dr["Id"] = id; dr["Detail"] = "<a href='home.aspx#" + id + "' >Detail</a>"; dt.Rows.Add(dr); gridView.DataSource = dt; gridView.DataBind();
mimimimilaw
Posts
-
How to Dynamic add html in GridView by c# code???? -
Any freeware event calendar develop in .NET 1.1 ????It is not simple to change from 2.0 to 1.1. Any recommend?
-
Any freeware event calendar develop in .NET 1.1 ????Dear friend, Do you know any freeware event calendar develop in .NET 1.1?? It just used to show the event in month (e.g. simple version of google calendar). No need for edit. Urgently needs. Big Thanks, Mimi
-
How to create subfolder by FtpWebRequest in .net2.0?FtpWebRequest reqFTP; dirName = "/dir1//dir2//dir3"; reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + ip + "/" + dirName)); reqFTP.Method = WebRequestMethods.Ftp.MakeDirectory; this.textBox\_status.Text += WebRequestMethods.Ftp.ListDirectory; reqFTP.UseBinary = true; reqFTP.Credentials = new NetworkCredential(Username, Password); FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); Stream ftpStream = response.GetResponseStream(); ftpStream.Close(); response.Close();First, how to check the folder exist or not on the FTP? The code can only create a directory in the path can we create multiple directory in the same time? Thanks
-
A potentially dangerous Request.QueryString value was detected from the client (ReturnUrl="...1111&#Write"). [modified]i would like my application redirect after login. Url: http://mySite.com/Login.aspx?ReturnUrl=http%3A%2F%2FmySite.com%2Fpage.aspx%3F%26pid%3D1111%26%23Write But don't know why the application return a error: A potentially dangerous Request.QueryString value was detected from the client (ReturnUrl="...1111&#Write"). Could anyone help?
modified on Thursday, October 9, 2008 5:12 AM
-
How to drag and drop a file into DataGridView? [modified]I would like to drag and drop a row in DataGridView on .net framework 2.0 the row is a file detail from window explorer.
private void dGV_fileUpload_DragDrop(object sender, DragEventArgs e) { Object fileName = (Object)e.Data.GetData(typeof(????)); FileInfo file = new FileInfo(fileName); DataGridViewRow row = new DataGridViewRow(); row.CreateCells(dGV_fileUpload); row.Cells[0].Value = file.Name; row.Cells[1].Value = GetFileSize(file.Length); row.Cells[2].Value = file.LastAccessTime.ToString(); this.dGV_fileUpload.Rows.Add(row); }modified on Wednesday, September 24, 2008 5:44 AM
-
Unable to get updated config at app.config?I am working on a application on .net 2.0. Sometime would update the app.config setting. However, my app do not get the updated app.config setting until i rebuild the app. Do anyone tell me y and help me fix the problem. Thanks~~~
-
Backgroundworker with EventWaitHandle no respond????I am writing a windows application to upload file by using Backgroundworker and EventWaitHandle. But it doesn't get any respond after run the line 'handle.WaitOne();'. Can anyone help?
private void btnUpload_Click(object sender, EventArgs e) { BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += new DoWorkEventHandler(worker_DoWork); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted); MessageBox.Show("FTP 1"); worker.RunWorkerAsync(); MessageBox.Show("FTP 2"); handle.WaitOne(); // This blocks main thread MessageBox.Show("FTP 3"); } static void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { MessageBox.Show("FTP 4"); handle.Set(); } -
How to get app.config value at .net framework 2.0?Another error :Configuration system failed to initialize. Please help.
-
How to get app.config value at .net framework 2.0?using System.Configuration;
static void ShowConfig()
{ // For read access you do not need to call the OpenExeConfiguraton foreach (string key in ConfigurationManager.AppSettings) { string value = ConfigurationManager.AppSettings\[key\]; Console.WriteLine("Key: {0}, Value: {1}", key, value); } }get an error The name'ConfigurationManager' does not exist in the current context. Can anyone help?
-
How do I know BackgroundWorker work complete?can you show me the example how waithandles work with BackgroundWorker. Thanks.
-
How do I know BackgroundWorker work complete?I would like to upload file one by one using BackgroundWorker. But it seems the application using multi-thread to uplaod. Is there any methods like Thread.join on backgroundWorker? Thanks, Mimi
-
Access Share folder in c#My Web App want to access a share folder //IP/share/detail. The folder "detail" was shared to everyone. in Web.Config identity impersonate="true" was added. in machine.config processModel userName="SYSTEM" password="AutoGenerate" userName was changed. In code
File.Exists("//IP/share/detail/"+fileName)It return false although the file exist in the folder. Do you have any idea why the file cannot be access? -
System.Text.RegularExpressions.Regexany method, which can do the same thing, is OK.
-
Auto incrementThanks All, I try to do what I want in other methods.;)
-
System.Text.RegularExpressions.Regexstring = "www.abc.com?page=123&no=456"; if I want to cut the "page=123", how to do it? I would like to use System.Text.RegularExpressions.Regex. finally string = "www.abc.com?no=456"; THANKS:laugh:
-
Auto incrementIt maybe 10, 20, 45 or any number. How can I using mssql statement to do this?:)
-
Auto incrementI am using auto increment for the primary key in a table. For example, table - (userID, UserName). Now the auto increment of last userId = 10. If I would like to insert a userId = 111, I found that the next auto increment userId must be in 112, but it is not 11. Is there any setting to change back the UserId to 11? Thanks!:)
-
Timer in C#Dear All, I would like the time the execution time for a script. But I did not get any idea for using timer. Any Example for counting the time of running time in a simple way? Thanks!:)
-
Find Out the executed page???Dear All, My web Application include a lot of .cs page. Sometimes, they call each other. Is there any methods to find out all the name of the executed pages when we browse one page. There are the same base class and different page name for each page. Thanks:-D