|
Do you know which line of code and even more interesting which object causes this exception? If not, try to find out and afterwards explore where this object is previously set to null or why it wasn't initialized.
www.troschuetz.de
|
|
|
|
|
I want to show an arrow between the new inserted table and the last one that is already on word doc.
I am use a button to insert a new table on click of that button new table is inserted…
Anybody knows about that..
thanks
|
|
|
|
|
Hi,
I had a default role for a new member in my web.config file. Something with a value like "Member", but now I changed it to the corresponding ID (auto incrementing value):
<add key="DefaultRoleForNewMember" value="2"/>
I have a public method that goes and retrieves this value. When the value was still a string and not the 2, my function worked like this:
public static int DefaultRoleForNewMember
{
get
{
string strRole = WebConfigurationManager.AppSettings["DefaultRoleForNewMember"]);
if (string.IsNullOrEmpty(strRole))
throw (new NullReferenceException("DefaultRoleForNewUser configuration is missing from your web.config. It must contain <appSettings> <add key=\"DefaultRoleForNewUser\" value=\"Member\" /> </appSettings>"));
else
return (strRole);
}
}
Now that I have the value of 2, I will have to convert it to an int when getting the value for the web.config file. But now my confusion comes in where I throw an exception, like I had for if (string.IsNullOrEmpty(strRole))
I hope this is clear enough. Please let me know.
Regards,
ma se
|
|
|
|
|
I would do the conversion to an integer inside the else branch. If the conversion goes wrong you could throw another exception there telling that the DefaultRoleForNewUser exists but is invalid.
www.troschuetz.de
|
|
|
|
|
What exception must I try and catch?
|
|
|
|
|
|
sam_g1 wrote: I don’t know how to use the show the aero..
Could you explain as to what an AERO is?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
hi
in the class library i am using filereaders,fileinfo,filestreams for reading and writing files for source and destination paths but i am getting error near the filereaders,filestreams "namespace or assembly missing" .Even if i use System.IO it still gives me an error.
Any solution for the above problem
sasi
|
|
|
|
|
Look at the error message, it will tell you exactly what class it has problems with. Then you look up the class in MSDN Library[^], there you will see what namespace the class is in.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I hope I'm not the only one hit by this: in some window forms I have a DataGridView having a DataSet (filled from a select) and AutoSizeColumnMode set to Fill. Before the form is showing up I get an unhandled exeption message with "This operation cannot be performed while an auto-filled column is being resized" - I have no clue about what operation we talking about and the exception is thrown randomly (and never if step through the application in debugger). If click Continue everything is OK, the form comes up filled, aligned and resized.
Somebody please give me a hint.
|
|
|
|
|
HI
how can add a object for example a line object to report in running mode ?
Regards Amir Jalaly
|
|
|
|
|
Hi,
I have a Win Form with a Main Menu, and I need to open one of these menu options via code.
I'm trying to password protect a menu. I've got it set up so that when a user selects a particular menu option, a Form pops up asking for a password. The trick is to open the menu without a select event happening (after the password is verified).
If you know of a better way to go about this, that would be great. I could have all the SubmenuItems Enabled=false by default and then change to true, but I think it would be better not to show the SubmenuItems at all.
Thanks,
Ron
|
|
|
|
|
Hi!
Simply set the Visible property of the menu items in question to false and change it to true once the password has been verified...
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Thanks Mav,
I put the menu as not enabled. I didn't think that you could have a click event on an unenabled menu... but you can. When the password is verified, the menu becomes enabled.
Ron
|
|
|
|
|
Hai Everybody,
I have project it is related to resume presently it is a window based application. They need to change it has a web application, In that they have a feature called (Automation of scanning a document and put the information in the match field) like when we scan a certain resume it might be in any format, but it will collect the information from resume eg., name and put it in the name field on the screen. How is it possible if u have any idea plz let me know or from u r friends.
Please do Needful..............
Advance Thanks
Srinivas.N
|
|
|
|
|
Do you mean scanning a the resume on a paper using a scanner?
If yes then you could always scan a document and store it in word format, then use the Word API to read the contents of the file and store them in your native format.
Hope this helps.
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
hi all,
I need to split below string using another string " "
MINIMUM STAY:
NILL
MAXIMUM STAY:
1M
DATE/ROUTE CHANGES:
REBOOKING
Before departure - Charge GBP30
After departure - Charge GBP30
when I am doing like this
string[] lparr=lstrFileContent.Split(" ".ToCharArray());
when I am doing like this, string spliting it using char '<','H','R','>'.
But I need to split using whole " ".
So can any one please tell me how to split a string using another string?
thanks in advance.....
|
|
|
|
|
public String[] ConvertString(string Str)
{string [] StrArray = Str.Split(new Char [ ] {'H'});
return StrArray;
}
the only thing is, this splits a string into an array,
you could then pluck out each of the values out of the array
|
|
|
|
|
If you are using the .net 2.0 framework you can use the following call:
string[] lines = "Line1<HR>Line2".Split(new string[] { "<HR>" }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
|
You could replace the string "<HR>" with a single character that's not used elsewhere (even '\0' works, btw.) and then use a regular string.Split with the substitute character:
string tmp = lstrFileContent.Replace("<HR>", "\0");
string[] lparr = tmp.Split('\0');
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Nice, I like this idea, should come in handy when working on .net 1.1
static string[] Split(string stringToSplit, string seperator)
{
char sep = '\0';
while (stringToSplit.IndexOf(sep) >= 0)
{
sep++;
}
stringToSplit = stringToSplit.Replace(seperator, sep.ToString());
return stringToSplit.Split(sep);
}
Usage:
string test = "Split this<HR>here";
string test2 = "Split here<HR> but ignore\0 null<HR>\x01 yea";
string[] lines = Split(test, "<HR>");
string[] lines2 = Split(test2, "<HR>");
|
|
|
|
|
hey CP (codeproject), greetings. I would love for someone to help me develop a class that can send bytes of audio information thru a stream and also read bytes from it and play it.
ian Munez developed a recording and playback loop class but i dont know how to apply it to the network stream.
i already setup the streamingf session. all i want to know is how to send the bytes from the microphone buffer, and alos how to play buffer from the network stram thru the playback buffer. thanks
|
|
|
|
|
Don,
Are you trying to say read a MP3/WAV/mulaw/AdLaw type file and stream it to some player? If so then first I have to ask is what kind of codec are you planning to use, what kind of hardware are we talking about. This is a reasonable complicated proposition because of the size of technical specifications on the various file formats. So for one, you are probably best served by choosing a single file format to tackle.
When you can fufill the basic requirement of reading the file and writing out a viable copy, then you are ready to apply the streaming. I also have to ask you is this an application you might consider using SIP for? And by the same token if you are using a Dialogics card, or other commercial kit, the SDK should provide the tools to get you going. At this point however I lack enough information to be of any really help.
Good luck
Mike
Mike Luster
CTI/IVR/Telephony SME
|
|
|
|
|
i am using Notify icon control. everything is working fine except when i run the program notify icon appears in taskbar. when i close the program it doesn't go from there , agian run the program now there are two icons , ever time i run the program icons icreases but i keep mouse over the icons .icons remove automatically. i didn't understand why this is happning.
i would like when i close the program icon remove form taskbar automatically.
please help me out
Amit Grover
CDAC R&D
|
|
|
|
|
Even i am facing the same problem
When i close the application from the cross button of the form
i have disposed the Notify icon so that time it goes off
but if i stop the program execution from the studio
the Notify icon stays in the TaskBar
Please explain me if anyone knows the reason behind it
Regards,
Pramod
|
|
|
|