Click here to Skip to main content
15,914,163 members
Home / Discussions / C#
   

C#

 
Questionhi, help me , exe path problem in c#.net Pin
premkamalg19-Sep-06 19:03
premkamalg19-Sep-06 19:03 
AnswerRe: hi, help me , exe path problem in c#.net Pin
Andrei Ungureanu19-Sep-06 19:35
Andrei Ungureanu19-Sep-06 19:35 
GeneralThanks Karkster Pin
premkamalg19-Sep-06 20:32
premkamalg19-Sep-06 20:32 
GeneralThanks Karkster Pin
premkamalg19-Sep-06 20:32
premkamalg19-Sep-06 20:32 
GeneralThanks Karkster Pin
premkamalg19-Sep-06 20:32
premkamalg19-Sep-06 20:32 
GeneralRe: Thanks Karkster Pin
Nafiseh Salmani19-Sep-06 23:37
Nafiseh Salmani19-Sep-06 23:37 
QuestionSimple path finding problem. Pin
f*** YOU19-Sep-06 16:11
f*** YOU19-Sep-06 16:11 
QuestionXPath expression problem... Pin
Kasic Slobodan19-Sep-06 15:35
Kasic Slobodan19-Sep-06 15:35 
I have a xml file organized like this:


BlackBox Version="1.0"
  MainForm Name="frmMain" Value="WillnessLabs BlackBox"
    Control Name="label1" Value="Test label" 
    Control Name="button1" Value="Test button" 
    Control Name="tabPage1" Value="Test tab1" 
    Control Name="tabPage2" Value="Test tab2" 
  MainForm>
  MainForm Name="frmOptions" Value="My beloved options"
    Control Name="label1" Value="Test label" 
  MainForm>
BlackBox



And I use this code below, to find the control on the form and to set the value to it...


string name, value;
      nav = doc.CreateNavigator();
      node = nav.Select("/BlackBox/MainForm[@Name='frmMain']");

      while (node.MoveNext())
      {
          name = node.Current.GetAttribute("Name", "");
          value = node.Current.GetAttribute("Value", "");

          FindControl(form, name).Text = value;
      }



It works like a charm if the xpath expression is "/BlackBox/MainForm/node()".
But if I want to run xpath expression like this "/BlackBox/MainForm[@Name='frmMain']" to load just nodes for the current form

the user is on, so I don't need to load those for options, I get an error.

Object not set to an instance of an object.

What Iam doing wrong? Is xpath expression good? What expression do I need to get this done?
AnswerRe: XPath expression problem... Pin
Stefan Troschuetz19-Sep-06 22:05
Stefan Troschuetz19-Sep-06 22:05 
GeneralRe: XPath expression problem... Pin
Kasic Slobodan20-Sep-06 0:31
Kasic Slobodan20-Sep-06 0:31 
QuestionDeveloping a voice chat application Pin
amor5019-Sep-06 15:02
amor5019-Sep-06 15:02 
AnswerRe: Developing a voice chat application Pin
Andrei Ungureanu19-Sep-06 19:40
Andrei Ungureanu19-Sep-06 19:40 
GeneralRe: Developing a voice chat application Pin
amor5020-Sep-06 14:30
amor5020-Sep-06 14:30 
Questionproblem using VC++ DLL in VC# Pin
saania khan19-Sep-06 13:42
saania khan19-Sep-06 13:42 
AnswerRe: problem using VC++ DLL in VC# Pin
Christian Graus19-Sep-06 13:54
protectorChristian Graus19-Sep-06 13:54 
QuestionRe: problem using VC++ DLL in VC# Pin
saania khan21-Sep-06 19:44
saania khan21-Sep-06 19:44 
AnswerRe: problem using VC++ DLL in VC# Pin
Christian Graus21-Sep-06 19:51
protectorChristian Graus21-Sep-06 19:51 
GeneralRe: problem using VC++ DLL in VC# Pin
saania khan22-Sep-06 11:43
saania khan22-Sep-06 11:43 
QuestionWork with voice applications Pin
Charlesmaster19-Sep-06 11:57
Charlesmaster19-Sep-06 11:57 
QuestionHave anyone done this problem before Pin
tmn11419-Sep-06 11:42
tmn11419-Sep-06 11:42 
AnswerRe: Have anyone done this problem before Pin
Christian Graus19-Sep-06 11:45
protectorChristian Graus19-Sep-06 11:45 
GeneralRe: Have anyone done this problem before Pin
tmn11420-Sep-06 11:05
tmn11420-Sep-06 11:05 
Questiongetting an HTMLInputElement using mshtml.dll Pin
Green Fuze19-Sep-06 11:16
Green Fuze19-Sep-06 11:16 
AnswerRe: getting an HTMLInputElement using mshtml.dll Pin
Nick Parker19-Sep-06 11:46
protectorNick Parker19-Sep-06 11:46 
GeneralRe: getting an HTMLInputElement using mshtml.dll Pin
Green Fuze20-Sep-06 13:14
Green Fuze20-Sep-06 13:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.