Jump to content
Xtreme .Net Talk

RedLeader

Members
  • Posts

    25
  • Joined

  • Last visited

About RedLeader

  • Birthday 02/28/1980

Personal Information

  • Occupation
    Software Developer
  • .NET Preferred Language
    C#, VB.Net

RedLeader's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Try to get Collumn by index instead. and after this DataRow[] row = Table.Select("["+ columnName + "]" + " = 'Alice');
  2. So, if you add that div from Codebehind you'll have no problem to remove it. This example will show you how to add DIV to TableCell (You can add it to whatever you want ) and how to remove it. aspx code: .... <table> <tr> <td id="myTD" runat="server"> </td> </tr> </table> .... aspx.cs code: HtmlGenericControl div2 = new HtmlGenericControl("div");//DIV declaration protected void Page_Load(object sender, EventArgs e) { div2.ID = "div2"; HtmlButton btn = new HtmlButton(); //put some DIV controls just to see if it's there btn.ID = "btn1"; div2.Controls.Add(btn); myTD.Controls.Add(div2);// Add it to the TableCell } protected void Button1_Click(object sender, EventArgs e) { //Here is, remove the DIV. myTD.Controls.Remove(div2); } }
  3. Try this: <html> <head> <title>some title</title> <script type="text/jscript"> function setDivCode(myCode) { var myDiv = document.getElementById('div1'); myDiv.innerHTML += myCode; } </script> </head> <body> <input type="text" id="txt" value="<b>here is my code</b>"/> <input type="button" id="btn" onclick="setDivCode(txt.value);" /> <div id="div1"> <a href="http://www.google.com" id="lnk">google</a> </div> </body> </html>
  4. Thanks MrPaul, I've tried with z-index but it's still rendered below.
  5. Hi, I have a javascript context menu (Div element). When try to popup menu over asp:ListBox or HTML <SELECT> element the menu stay behind and ListBox is on top of it. Is this some kind of IE bug? Thank you.
  6. Is any way to check if doc is password protected?
  7. If I make Dll for my project, is possible someone to "steal" it and use it from other application? Thank you.
  8. I sort this out. don't Forget to add references using MySql.Data; //..... MySql.Data.MySqlClient.MySqlConnection conn; MySql.Data.MySqlClient.MySqlCommand cmd; conn = new MySql.Data.MySqlClient.MySqlConnection(); cmd = new MySql.Data.MySqlClient.MySqlCommand(); string SQL; UInt32 FileSize; byte[] rawData; FileStream fs; conn.ConnectionString = "server=127.0.0.1;uid=root;" + "pwd=12345;database=test;"; try { fs = new FileStream(@"c:\image.png", FileMode.Open, FileAccess.Read); FileSize = fs.Length; rawData = new byte[FileSize]; fs.Read(rawData, 0, FileSize); fs.Close(); conn.Open(); SQL = "INSERT INTO file VALUES(NULL, ?FileName, ?FileSize, ?File)"; cmd.Connection = conn; cmd.CommandText = SQL; cmd.Parameters.Add("?FileName", strFileName); cmd.Parameters.Add("?FileSize", FileSize); cmd.Parameters.Add("?File", rawData); cmd.ExecuteNonQuery(); MessageBox.Show("File Inserted into database successfully!", "Success!", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); conn.Close(); } catch (MySql.Data.MySqlClient.MySqlException ex) { MessageBox.Show("Error " + ex.Number + " has occurred: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } I hope this will help to others. source : http://dev.mysql.com/doc/refman/4.1/en/connector-net-using-blob.html#connector-net-using-blob-writing
  9. OK,The Column type is Blob, but what format should be the File(stream byte array) I've tried to insert Byte Array just like i MSSQL binary field, is this OK? Thanks
  10. The Path is ok. I've tested it. The File Field is the problem :(
  11. Hi, I have problem when i try to add File to MySQL DB(ver. 4.1.15) What Type should be the collumn? ... void InsertFile(byte[] byData) { string MyConString = "DRIVER={MySQL ODBC 3.51 Driver};" + "SERVER=127.0.0.1;" + "DATABASE=customers;" + "UID=root;" + "PASSWORD=*****;" + "OPTION=3"; OdbcConnection MyConnection = new OdbcConnection(MyConString); MyConnection.Open(); string mySelectQuery = "INSERT INTO FilesDB (Path, File) VALUES ('C:\test', byData )"; OdbcCommand myCommand = new OdbcCommand(mySelectQuery,MyConnection); myCommand.ExecuteReader(); } .... i've tryed this code. N.B. The file is Binary. Any suggestions? Thank you, RL
  12. Thanks bri189a I 've been there, its usless(for me ) becouse i need to use this dll,there is not source for it. I wanna make my Dll
  13. Hi, I need To open Compound File, is this possible in C#? Thanks
  14. I wondering is the way to know when the application is runed in Debug mode? if(debug == true) { Console.ReadLine(); } Thank you
  15. Yes you can do this http://tidy.sourceforge.net/ here you will find the tool that do this XHTML is HTML with closing tags in the end (like XML) If you need More help ask Regards, RL
×
×
  • Create New...