|
I use an attribute:
<PUlat Align="right" Hide="false" Null="true" />
then if I use XSLT to transform the XML to HTML I can insert a non-breaking space in place of the null.
|
|
|
|
|
We can browse and open the system files using OpenFileDialog Box.How can we open the selected file in a separate window?Can anyone direct me with the code for this, please.
|
|
|
|
|
Chithra Anoop wrote: How can we open the selected file in a separate window
Separate window of your application?
|
|
|
|
|
You should pass your file info into your "Other Window" (if it's in your application) by its constructor, something like this:
void Button_Click(object sender, EventArgs e)
{
if (OpenFileDialog.ShowDialog() == DialogResult.OK)
{
AnotherForm form2 = new AnotherForm(OpenFileDialog.FileName);
form2.Show();
}
}
and then in your AnotherForm:
public AnotherForm(string filename)
{
RichTextBox.LoadFile(filename);
}
While (true) { Human.isLearnable = true; }
|
|
|
|
|
Hi all
could anyone teel me how that code work in briefe plz?
<br />
using System;<br />
using System.Data;<br />
<br />
public class Account<br />
{<br />
public static DataSet GetAllAccounts()<br />
{<br />
return (new DataSet());<br />
}<br />
<br />
public void DepositMoney(decimal amount, string accountNumber)<br />
{<br />
if (this.validateAccount(accountNumber))<br />
{<br />
}<br />
}<br />
<br />
private bool validateAccount(string accountNumber)<br />
{<br />
return true;
}<br />
}<br />
<br />
public class Payments<br />
{<br />
static void Main()<br />
{<br />
DataSet dsAccountList = Account.GetAllAccounts();<br />
Account account = new Account();<br />
account.DepositMoney((decimal)249.99, "56329SVZ");<br />
}<br />
}<br />
<br />
tanx for ur help
no
|
|
|
|
|
I am not sure what you are asking. Are you confused with the static GetAllAccounts method? If yes, it is a factory method. Read about factory pattern.
|
|
|
|
|
First go through the code.It is simple.One thing is GetAllAccounts()method .it is static so it is accessed by directly Classname because a static mathod doesn't need a call from the instance of the class.
If there is any other point.Feel free to ask.
Cheers!!
Brij
|
|
|
|
|
I have created help files using HTML workshop and also WinCHM, when i try run the .chm file - it shows a "This program cannot display the webpage".. what am i doing wrong?
Thanks.
|
|
|
|
|
Hi Slick69,
maybe this is a security problem. Just select the file in the windows explorer with the right mouse button and choose "Properties" from the context menu. On the first tab you can allow access to this file. Hope this solves your problem.
Regards
Sebastian
|
|
|
|
|
Hi,
i see in some articles that after adding a report file you select the dataset.
I really like creating the dataset by code rather than dataset object of c#.
I see i have to drag field of the dataset to the report, it does work fine! i just like to do it in code.
I will try to find out how.
Is there an article on that? any help here?
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
When you design crystal report, it requires the data schema. It allows to load from a XML file. DataSet has a WriteXML method. Using that write a xml file to the drive. Use this xml file to design your report. Each time you have to fill dataset and assign to report.
|
|
|
|
|
|
I have search the CP site, and Google of course, but still haven't found what I am looking for.
Can you guys give me some links to articles/pages with information on using C# to do Binary Network Streams with C# asyncronously with multiple clients?
I am looking to make a program that sends different types of data back and forth between clients and server. I did get it to work with Remoting, but it gets slow with a bunch of clients. I would like to learn about binary streams anyway and this is a side project that doesn't need done right away. Also, I did get the binary network stream type of connection to work with one client, with only one send/recieve, but then it fails.
I think I might just be using the wrong keywords in my searches, if you know any I should try, send them my way as well.
Anyway, thanks for any and all help, and thank you for your time, I appriciate it.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
System.Net.Sockets.NetworkStream?
|
|
|
|
|
In the code I am working with i have a class called
RecordHistoryService<x,y>
X, and Y are unknown at design time and known at runtime
i need to instantiate RecordHistoryService<x,y>, is there any way to do it?
I have this, but it doesnt compile:
i.e.
Type _rhType = Type.GetType(rhType);
Type _entityType = Type.GetType(entityType);
RecordHistoryService<_rhType, _entityType> recordHistory;
thx for your help
|
|
|
|
|
Look into reflection.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Is that the only way to do this?
I know that reflection is rather expensive.
|
|
|
|
|
It is the only way I can think of doing it. It is kind of expensive but not too horrible, one alternative(and I say that for lack of better word) is to make a bunch of methods that are specific to the type being passed, although I would NEVER do this, it is horrible practice.
My suggestion is reflection, although kind of expensive, it won't be bad unless doing this many times very fast.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
If the types are not totally random, you could use some kind of factory method to instantiate it...if totally random, I think the easiest way is to use reflection, or something like this article
Intelligence is almost useless for those who have nothing else!
Email: caiokf@gmail.com
|
|
|
|
|
You'd be looking at Type.MakeGenericType(...) off the top of my head.
|
|
|
|
|
I need a way to detect if my application is running in a TS/RDP session rather than right in front of the computer. I understand that Process.SessionID will be non-zero for a TS/RDP session. However, I just tested in Vista and it was a '1'. Does anyone know of a way to do this that will work in XP and Vista?
|
|
|
|
|
John Sposato wrote: Does anyone know of a way to do this that will work in XP and Vista?
I dont know either, but you can and should test it!
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - coming soon ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
I have a sql query and its return integer value.
sql = "...."
cmd.CommandText = sql;
ERROR: int id = (int)cmd.ExecuteScalar();
CORRECT: int id = Convert.ToInt32(cmd.ExecuteScalar());
Why can i get error when do casting between object type to integer data type?
|
|
|
|
|
Could it be that your query is returning null? You haven't said what error message you're getting!
If so, a null object can't be explicitly cast to an int [You could use a nullable int: (int?) ]. Convert.ToInt32(object) however returns zero if object is null.
If it's not the above, post the error message you're getting.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Most likely the first column of the first row in result is not an int (but for example DbType.Decimal etc).
If you get InvalidCastException, the exception along with the stack should show you what you are actually trying to cast to int.
The need to optimize rises from a bad design
|
|
|
|