|
You can use Microsoft Enterprise Library Configuration block to encrypt the config file. For details you can go to MSDN and search for Enterprise library configuration block or just google it. There will be tons of examples.
Thanks
|
|
|
|
|
I'm having problem with dataGrid bcs i want to implement on it DateTimePicker as first Column (Primery key) so plz if u can help me with a sample code
Best Regards
charbel
|
|
|
|
|
There are plenty of samples out there of hosting a DateTimePicker within a dataGridColumn. A quick google search pulled up many possibilities - im also 99% sure there will be one or more articles right here on CodeProject
Heres the google search
DateTime DataGridColumn[^]
Also, are you sure a DateTime is a good candidate for a PrimaryKey?
|
|
|
|
|
I am writing a guitar music display app, the sort with the chords above the words, you've all seen them! I'm making it do other stuff aswell as that, but prolly the main reason I'm doing it, is to get my head around programming C# and .NET. I learn better by doing.
I've knocked up a custom crontrol that can correctly display a chord, but I'm worried that a large song would have to have dozens of the controls throughout it and that seems wasteful to me. I was wondering if I could have one such control hidden on the form, use it to render the image of the chord, then copy that image onto the form page itself, above the words. Does that make sense? If this is not poss, can I do a control array, like I used to in VB6?
Also, any advise/tip you'd like to give me on scrolling? I'm just going to wwrite text and hopefully chord images directly to the form, so will have to be able to scroll the form and want it to draw quickly.
errr, help?
!!
Thanks in advance.
Jim
|
|
|
|
|
Hello,
I have a very large datasource, and the way I am exporting the dataset to Excel, is I go through each row and each column, and populate excel document cell, by cell. It takes a very long time. Is there a better way of exporting the dataset into Excel? Thank you.
|
|
|
|
|
Build a Table in HTML, write it to a textfile with a .xls extention and it'll open fine in excel. The slowness you descibe is interoperating with the Excel com object.
try this - copy and paste the below into notepad. Save it as test.xls (remember to choose all files, otherise notepad will name the file test.xls.txt) and now double click in explorer.
row 1 cell 1 | row 1 cell 2 | row 2 cell 1 | row 2 cell 2 |
|
|
|
|
|
Is it possible to do formating of the data in HTML format as well? Here is the code of mine that populates the excel sheet:
<br />
Microsoft.Office.Interop.Excel.ApplicationClass excel = new Microsoft.Office.Interop.Excel.ApplicationClass();<br />
Microsoft.Office.Interop.Excel.Range theRange;<br />
<br />
excel.Application.Workbooks.Add(true); <br />
excel.Visible = true; <br />
<br />
int ColumnIndex=0; <br />
foreach(DataColumn col in dataview.Table.Columns) { <br />
ColumnIndex++;<br />
if (ColumnIndex > 3) {<br />
excel.Cells[1,ColumnIndex-3] = styleSummary.GridColumnStyles[col.ColumnName].HeaderText;<br />
theRange = (Microsoft.Office.Interop.Excel.Range)excel.Cells[1,ColumnIndex-3];<br />
if (col.ColumnName == "Description") {<br />
theRange.ColumnWidth = 35.71;<br />
}<br />
theRange.Interior.ColorIndex = 15;<br />
theRange.Font.Name = "Arial";<br />
theRange.Font.Bold = true;<br />
<br />
<br />
} <br />
}
<br />
int rowIndex=0;<br />
foreach(DataRowView row in dataview) { <br />
rowIndex++; <br />
ColumnIndex=0; <br />
<br />
foreach(DataColumn col in dataview.Table.Columns) {<br />
ColumnIndex++; <br />
if (ColumnIndex > 3) { <br />
if (col.ColumnName == "Description") {<br />
excel.Cells[rowIndex+1,ColumnIndex-3] = this.getSpaces(level.Length)+row[col.ColumnName].ToString(); <br />
} else {<br />
excel.Cells[rowIndex+1,ColumnIndex-3]=row[col.ColumnName].ToString();<br />
} <br />
theRange = (Microsoft.Office.Interop.Excel.Range)excel.Cells[rowIndex+1,ColumnIndex-3];<br />
theRange.Font.Name = "Arial";<br />
theRange.Font.Size = 8;<br />
theRange.NumberFormat = "$#,##0";<br />
}<br />
theRange.Interior.ColorIndex = this.getColour(level);<br />
theRange.Borders.ColorIndex = 15;<br />
<br />
} <br />
}
}
Microsoft.Office.Interop.Excel.Worksheet worksheet = (Microsoft.Office.Interop.Excel.Worksheet)excel.ActiveSheet; <br />
worksheet.Activate();<br />
Is it possible to do the same formating in HTML, or build the text file?
Thank you
|
|
|
|
|
I cant use Process. at all, it says that i'm missing something or other, but nothing changed since the last time i used it, i dont think?
Any ideas?
|
|
|
|
|
The Undefeated wrote: it says that i'm missing something or other,
if u add a reference to 'something or other', i'm sure it will work
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
|
I've got the following which compiles ok in dot.net 1.0, but when I compile it in dot.net 2 it won't compile.
public static void SetFocus(System.Web.UI.Page pg, string ControlName)
{
System.Text.StringBuilder jScript = new System.Text.StringBuilder();
jScript.Append("");
jScript.Append("document.getElementById('" + ControlName + "').focus();");
jScript.Append("");
pg.RegisterStartupScript("setFocus", jScript.ToString());
}
The error it produces is:-
Can not switch: This end tag does not match up with a start tag.
I've no idea why - has anyone any clues.
|
|
|
|
|
Dont know the answer to your question, but for pete's sake if your going to use a StringBuilder then dont concatenate a string in the append call - there is a perfectly good AppendFormat method too!.
ie/ this:
jScript.Append("document.getElementById('" + ControlName + "').focus();");
should be
jScript.AppendFormat("document.getElementById('{0}').focus();",ControlName);
|
|
|
|
|
Fair advice, but the compiler does convert the concatenation using + to string.Concat calls, so it really doesn't create any extra string objects.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
True, and im of the "let the compiler optimize your code" camp for sure.
However the advice given is true from so many other levels - readability, good practice, simply understanding the framework you're working in.
Letting the compiler optimize code is fine, but if the code starts off sloppy then dont expect the optimized code to be much better!
|
|
|
|
|
|
IIRC you can only emit that in the Page_load handler
xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
|
|
|
|
|
Hello there,
anyone can lock a control in design time using the Locked property in the properties window, setting it to true .
But is there a way to do that programmatically?
|
|
|
|
|
the Locked property simply stops the control being moved/resized at design time - it has no effect at runtime so quite why you would want to set this using code im not sure.
If you want to stop a control being used at runtime, you are after the Enabled property
|
|
|
|
|
Hello,
I need to use a Java Webservice which uses HTML/1.1 with transfer encoding: chunked. I already found postings that say that .NET is able to read chunked SOAP responses, but I haven´t found an arcticle about reading chunked SOAP messages.
Can anybody give me a hint how to process chunked SOAP XML response with C#, or has a link to an article about that?
|
|
|
|
|
Hai All,
Can I access the delphi compiled dll in .net.
I tried to use it by adding the reference but I am getting the error that it is not a valid com component or valid assembly.
I am getting information about the functions written in the dll in the dependency walker.
Can I accesst the dll functions through DllImport attribute.
Please help me
varmag
|
|
|
|
|
If you know the complete signature of the function (i.e. parameter definitions and types) you can use P/Invoke and the DllImport attribute.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hai Greeeg,
Thank You for your quick response.
I will check it.
Once again thanks for your response.
varmag
|
|
|
|
|
Hai Greeg,
Thanks for your hint.
Its working fine.
Thanking you
varmag
|
|
|
|
|
Hi all,
does anyone know a .NET PDF-Viewer control except Acrobat Reader(COM) (not necessarily for free) ?
Thanks in advance
Frank
-- modified at 5:55 Thursday 3rd November, 2005
|
|
|
|
|
Use the search from the main site, there are a couple of articles about PDF and C#
regards
modified 12-Sep-18 21:01pm.
|
|
|
|