|
Hi All,How can I create TreeView Control in WebForm.Im using ASP.Net1.1v.
Help me,please.Thank You in advance..
Hi,Im Razana
|
|
|
|
|
Hi Razana,
You can use the Internet Explorer Webcontrols of Microsoft for this. They add 3 more controls for you to use in ASP.Net 1.1 (I have blogged about the tabcontrol[^]).
You can download them Here[^].
Cu
Sven Cipido
|
|
|
|
|
can i save a graphich(ex rectangle) with DrawRectangle(bla...bla...) into some variabel ??
thx
Beginner C#
Yogyakarta - Indonesia
|
|
|
|
|
i think u can store the objects in form of binary file
rahul
|
|
|
|
|
i want a windowsservice which generates crystalreport in pdf automatically at regular duarations and mail has to send ..ex: i want to generate report automatically at 30 or 31st of everymonth and after generation it has to send mail itself automatically.can u please anybody help me out
rajesh m
|
|
|
|
|
thanks to all who help...
1)How do i read a 2 byte, 4 byte, or 8 byte value? I know how to read a one byte, but that only goes up to 255...
2)If any of you are familiar assembly, i need know now how to change (write) to an addresses hex dump, also known as Array of Byte (in most memory editing engines).
3) Reading/writing to a pointer I.E (0x1009624, offset: 0xb14), or any other pointer...
thanks in advanced
|
|
|
|
|
|
I am unable to figure out how to use the get-set style public properties to manipulate the private arrays of that class?
for example
public class Patient
{
private string[] m_labValues
//this is what i am clueless about.
//how do i get down to elements of this array?
//i am sure that this implementation is wrong.
public string LabValues
{
get { return m_labValues; }
set { m_labValues = value; }
}
}
from my main class i desire an ability to directly manipulate the
elements...like:
private Patient patient = new Patient();
patient.LabValues=new String[6];
patient.LabValues[0]="B.P is 120,80";
patient.LabValues[1]="Blood Sugar is 160"
..
..
..
I'm totally clueless about implementing this.
I understand that if i declare the m_LabValues itself as public, i will be able to manipulate it
directly with out using the get-set style
Can some one please help me?
dnahelix
|
|
|
|
|
You need to give your class an "indexer."
public class Patient
{
private string[] m_labValues;
public Patient(int labValueCount)
{
m_labValues = new string[labValueCount];
for(int i = 0; i < m_labValues.Length; i++)
{
m_labValues[i] = string.Empty;
}
}
public string this[int index]
{
get
{
return m_labValues[index];
}
set
{
m_labValues[index] = value;
}
}
}
private Patient patient = new Patient(6);
patient[0] = "B.P is 120,80";
patient[1] = "Blood Sugar is 160";
Error checking omitted for brevity's sake.
|
|
|
|
|
You could simply do the following:
public string[] LabValues
{
get { return m_labValues; }
set { m_labValues = value; }
}
}
This will work but is not considdered good coding. You should rather use a generic list or a public method to set the array.
public void SetLabValues(string[] ar)
{
m_labValues=ar;
}
|
|
|
|
|
try to read on "Indexers" in c#
leslie sanford gave an example of it also
|
|
|
|
|
I thank you all for your kind help. Leslie Sanford's example looks wonderful. I shall implement this and see. Thanks again
dnahelix
|
|
|
|
|
Hi,
dnahelix wrote: public string LabValues
{
get { return m_labValues; }
set { m_labValues = value; }
}
If you want the array m_labValues as a property, you must include the [] in its type:
public string[] LabValues {...}
That way your statements
patient.LabValues[0]="B.P is 120,80";
patient.LabValues[1]="Blood Sugar is 160";
are OK
If there is only one string array to expose (make publicly available) you could work
with an indexor, as others already told you; but for more than one array, that becomes
difficult since an indexor always uses the class name (in the ouside world) and this
(within the class intself), so the only way to differentiate is by the type of the index
variable, which does not have to be an int at all (it could be a string, or whatever
you like), but would be an int if it really stands for an index in an array.
|
|
|
|
|
(c/s c#)
In the mian window, I create a combox that is named axPageLayoutControl1,
I want to use the combox in the child wondows, how can I do ?
in the child wondows, I write it :
if(axPageLayoutControl1.Text!=null)
{
........
this.IbIPrinterName.Text=pPaper.PrinterName;
}
but the axPageLayoutControl1 could not find.
Give me a example ,please
|
|
|
|
|
Hello,
The point is that you can only have access to public members of your mainwindow from your childwindow.
But only if you have the reference of the mainwindow in the childwindow.
Using static fields is not good style, for that problem, but can be usefull in other tasks.
You could pass the reference of mainwindow to the childwindow over the childwindows constructor, or a property.
As it i bad style to make the whole combobox public, you should create methods or properties in your mainwindow, which return the informations you need.
Like:
public string PrinterNameText
{
get
{
if(axPageLayoutControl1!=null)
{
return axPageLayoutControl1.Text;
}
return string.Empty;
}
}
An other solution would be, using delegates.
There you have the luck, that Colin Angus Mackay wrote this fine article[^], which will help you.
Actually, there is also the child to parent connection over the reference, explaint.
All the best,
Martin
-- modified at 1:54 Friday 6th July, 2007
|
|
|
|
|
Either change the access modifier from private to public
or implement a property.. that get/sets the combobox control
|
|
|
|
|
I am trying to make a generic form that has a datagridview on it. I want to be able to send in multiple types of collections, the type will be determined at runtime, to the form to be bound to the datagridview. Im guessing I need to use generics for this, but Im not sure how to do it.
thanks
|
|
|
|
|
No, you probably want to use IEnumerable, or some other interface that is common to collection classes.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I tried using IEnumerable<object> but I could not convert List<> to use it. Am I doing something wrong?
|
|
|
|
|
IEnumeration is an interface that your collection has to implement. There are plenty of samples on implementing IEnumerable.
Once you've done that, you can simply use foreach to iterate over the collection.
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
Are there any decent memory debuggers out there that will work in a mixed C# and C++ (both managed and unmanaged) environment? I'm helping a collegue track down some problems in his code, the hunt started for a reason that the EngineExecutionException was being randomly thrown, but several AccessViolationExceptions were found after removing some "catch (Exception ex)" lines were removed, so we're tracking down these access violations first, thinking that they are perhaps some of the reasons behind the EngineExecutionException.
I've used BoundsChecker in the past with great success, but it looks like this as well as pretty much every tool I'm finding is for unmanaged C/C++ only. Managed code "shouldn't" have these problems, but unsafe code blocks are used quite a bit in an effort to speed the program up (speed is very imporant to this program) - and it's looking like the AccessViolationException isn't being thrown on all of the incorrect accesses, so we're getting some corrupted memory (even had a file get corrupted that was only open for read, still wondering how that happened).
-----
In the land of the blind, the one eyed man is king.
|
|
|
|
|
I'm working with VS2005, i create Crystal report bind it with DateSet and inside the form i put crystalreportviewer to display report data, after running project i foubd that crystal report is empty but DataSet has data inside it, i tried many time to check why this happend but i can't find any solution (note: i made DataSet with wizerd and crystal report too, so i didn't write any code).
please any one know why this happend please tell me
|
|
|
|
|
Hey,
Does anyone know of a way in .NET (C#) to use a key that will decrypt a something but not encrypt it. I looked at RSA,DSA, and TripleDES but when getting the private key it includes the public key as well. Does anyone know if this is possible or would I need to rethink my design.
Thanks
--
John
|
|
|
|
|
John,
I belive RSA is what your looking for. The basic idea is use the public key to encrypt the private key to decrypt. You can get the RSA class to export the key pair without the private key.
Hope this helps
~Nick
Forever Developing
|
|
|
|
|
Look at wiki
Mainly, you are concerned about the difference between Symmetric-key cryptography and Public-key cryptography.
From your post, it seems like you need Public-key cryptography but there is a catch!
Public-key by itself cannot encrypt large messages.
Public-key crypto is usually used for setting up a shared key or digital signatures(DSA).
In shared key, one encrypts the key using a Public-key crypto(RSA,ECC,...) and sends it to the other party. The other party decrypts the key and then both parties switch to a Symmetric cipher for future transmissions. (There is also diffie-hellman key exchanges as well).
In a DSA (roughly), you encrypt the hash of your message.
It might help if you explain in more detail what you are trying to do.
|
|
|
|