|
The PUT method is disabled by default in the web server. You have to enable it for the server to accept it.
---
b { font-weight: normal; }
|
|
|
|
|
thanks can u please tell me how i can enable it.
Know Yourself Then Grow Yourself.
|
|
|
|
|
|
Hi,
I need to pass values dynamically for a return type of a particular property.How could i do this.
Actually what happend is:I need to display time according to the user selected format.For that I have taken a proprty and that has constants.So for that i cant send values.I need to send the values only for the retun type.How could i do this.
|
|
|
|
|
I have no idea what you are talking about. Perhaps if you illustrated it with an example of what you are doing and what you want the result to be.
---
b { font-weight: normal; }
|
|
|
|
|
If i understand you correctly you need to return date in the format specified by the user. Does the user input the format (e.g. MM/DD/YY)? You could return as String and cast to the proper format.
|
|
|
|
|
You can override ToString and use it or you can just do like: yourTimeHoldingClassInstance.Time.ToString(userSuppliedFormatString);
public class YourTimeHoldingClass
{
public DateTime Time
{
get { return this.time; }
set { this.time = value; }
}
private DateTime time;
public override string ToString(string format)
{
return time.ToString(format);
}
}
|
|
|
|
|
Hi,
I am new to .NET, someone plz help me with the simple code below.
public partial class FontSelection : Form
{
public FontSelection()
{
FontFamily [] ff = FontFamily.Families;
for (int i = 0; i < ff.Length; i++)
{
try{ lbFonts.Items.Add(ff[i].Name);}
catch(Exception e )
{ MessageBox.Show(e + " null exception") ; }
}
}
}
I am getting NullReferenceException when I run it. I understood from reading some message boards that NullRefereceException is occurring here coz i havent instantiated the fontFamily. How do i do that?
I saw on help the overload list of FontFamily class and used FontFamily (String)
I tried ff[i] = new FontFamily ("Font") but complier doesnt like it. Im not sure what else to do, so plz help me
Praths
|
|
|
|
|
Hi,
May I suggest you:
- use a debugger to single-step your code.
- or you insert Console.WriteLine statements to see progress and intermediate results
(such as ff.Length)
- make sure lbFonts is not null.
Luc Pattyn
|
|
|
|
|
I doubt that the FontFamily array is the problem as you get it from the static Families property and I doubt that the elements of this array aren't initialized. Otherwise you would have found a bug in .NET Framework and should report it. But I think it is more likely you forgot to initialize lbFonts which then causes the exception.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Ok, but lbFonts is a listbox which i dragged and dropped on the form in visual studio. Do i need to initialize it? I assumed it is done automatically when u drag and drop the component on the form.
|
|
|
|
|
It should be done automatically, but maybe something gone wrong or you're calling the method at some moment of the form's lifetime were it's already uninitialized. As the other poster said use the debugger to find the cause of your exception.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
hi.
on my system this code runs fine. both as a class and as a method. however i didn't extend class from Form, rather just created a form and added a control. check your initialization code for FontSelection class (in addition to the base class Form).
regards.
|
|
|
|
|
How can I run my desktop application automaticly by the start up of the windows
Dad
|
|
|
|
|
Create a shortcut to the exe inside the "Startmenu"-"Programs"-"Autostart" folder.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Add a new string value to the registry key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run that points to your app.
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Or, more properly, create it as a Windows Service so that the end user can control the start up mode for the application, e.g. does it start up as Automatically or Manually.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hello
i'm trying to use the values i get from this code
for(int i=0;i<count;i++)<br />
{<br />
indice[i] = TableListBox.CheckedIndices[i];<br />
MessageBox.Show(indice[i].ToString());<br />
}
where TableListBox is actually a CheckedListBox and its checked indices are being stored in another array.
Now the problem is that when i run this code from its respective form it works fine, but as soon as i close the form and try to access this chunk of code from another form, it gives me the Index out of bound exception for CheckedIndices. i expect this is due to the reason that as soon as i close the form with the CheckedListBox, all its values are discarded.
i've tried solving this problem by storing the CheckedIndices into a static array, but it still is giving me the same exception.
So plz can anyone guide me about this problem of mine and tell me how to retain the checked indices after the form has been closed.
Thanks and awaiting ur reply
Saira
-- modified at 8:34 Monday 11th December, 2006
|
|
|
|
|
Posts marked URGENT will usually get ignored
only two letters away from being an asset
|
|
|
|
|
well mark
very kind of u to tell me that ,i'll be more careful in future.;P
so can u help me?????
|
|
|
|
|
you don't need to close it just hide it
|
|
|
|
|
it still gives the same exception
any other suggestins???
|
|
|
|
|
First the info you've provided isn't suffecient to judge the problem, but I'll take few guesses here.
1- The way you use to copy the array -ignoring the MessageBox of course- is quite wrong. You should use Array.Copy() or Array.CopyTo() static methods instead.
2- Failure of the static array ecludes that discarding the values of the CheckedIndices when closing the form is the problem.
3- Make a breakpoint and see the values of:
a. count
b. CheckedIndices.Count
c. indice.Count
Waiting for your reply.
Regards
|
|
|
|
|
well nader
the way i'm copying indices like this is due to the requirement of my problem.
the code i mentioned above is actually a function of form A. when i access this function from Form A, it works fine. But as soon i call the function from Form B it gives the exception. the complete function is:
public int[] GetCheckedIndices()<br />
{<br />
int count=Global.Instance.Count_Indices;<br />
indice = new int[count]; <br />
MessageBox.Show(count.ToString());<br />
for(int i=0;i<count;i++)<br />
{<br />
indice[i] = TableListBox.CheckedIndices[i];<br />
MessageBox.Show(indice[i].ToString());<br />
}<br />
return indice;<br />
}
now TableListBoxis the name of me checkedListBox
and CheckedIndices is its property.
indice has been declared as "public static int[] indice".
CheckedIndices.Count has the index of the items that have been checked in the chckedListBox.
ope this gives u enough information to understand the problem
awaiting you reply.
|
|
|
|
|
Things are starting to clear up a bit, but don't be frustrated when I tell you that you still didn't answer all of my questions. I'll put them straight this time:
1- Do you call GetCheckedIndices() from FormB directly? please post the code in FormB.
2- What is Global.Instance.Count_Indices?
3- When the above method is called by FormA. What are the numerical values of:
count, indice, TableListBox.CheckedIndices
4- Again when you call the same method from FormB; What are the respective values?
Forgive me if I didn't get a clear idea, or if I'm asking too much misleading question, but I'm trying to cover all the possibilities here.
Waiting for your reply. I hope that my next reply would be the answer.
Regards
|
|
|
|