Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

SJR_1

@SJR_1
About
Posts
12
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Read XML values (attributes and elements) with C#
    S SJR_1

    That's exactly what I need. Thank You So Very Much! :)

    C# csharp xml

  • Read XML values (attributes and elements) with C#
    S SJR_1

    I will be writing the records to a database. I thought the best way of doing that was getting the data into a datatable. to do that I need to add rows and populate the columns with the individual elements or attributes. The element Item and ItemNumber are only present in some conditions. So when I add them to the variables I should see something like this: +If all items exist Time = (string)c.Element("Time"), Description = (string)c.Element("Description"), ItemId = (int)c.Attribute("Itemid"), ***Note not HomeItemId**** Name = (string)c.Element("Name"), //Coffee ItemDescrip = (string)c.Element("ItemDescrip"), +If NO items exist Time = (string)c.Element("Time"), Description = (string)c.Element("Description"), ItemId = "" Name = "" ItemDescrip = "" Thanks, Sue

    C# csharp xml

  • Read XML values (attributes and elements) with C#
    S SJR_1

    Thank You, I have one more step to go. I'm getting the values into the variables, the only issue is getting the values that are in the item element.

    <Item>
    <ItemNumber id="0">
    <Name>Coffee</Name>
    <ItemDescrip>I Descrip1</ItemDescrip>
    </ItemNumber>
    <ItemNumber id="1">
    <Name>Tea</Name>
    <ItemDescrip>I Descrip 2</ItemDescrip>
    </ItemNumber>
    </Item>

    The tricky part to me is that sometimes they exists and other times they don't.

    C# csharp xml

  • Read XML values (attributes and elements) with C#
    S SJR_1

    XML File

    <Log>
    <HomeItem id="2">
    <Time>1/8/2014 3:21:47 PM</Time>
    <HasNewAddress>Y</HasNewAddress>
    <AddressType>N</AddressType>
    <Description>myDescrip</Description>
    <Item/>
    <Title/>
    </HomeItem>
    <HomeItem id="3">
    <Time>1/8/2014 6:52:47 PM</Time>
    <HasNewAddress>Y</HasNewAddress>
    <AddressType>N</AddressType>
    <Description>myDescrip2</Description>
    <Item>
    <ItemNumber id="0">
    <Name>Coffee</Name>
    <ItemDescrip>I Descrip1</ItemDescrip>
    </ItemNumber>
    <ItemNumber id="1">
    <Name>Tea</Name>
    <ItemDescrip>I Descrip 2</ItemDescrip>
    </ItemNumber>
    <ItemNumber id="2">
    <Name>Milk</Name>
    <ItemDescrip>I Descrip 3</ItemDescrip>
    </ItemNumber>
    </Item>
    <Title/>
    </HomeItem>
    <HomeItem id="4">
    <Time>1/8/2014 7:35:47 PM</Time>
    <HasNewAddress>Y</HasNewAddress>
    <AddressType>N</AddressType>
    <Description>my Descrip 3</Description>
    <Item>
    <ItemNumber id="7">
    <Name>Juice</Name>
    <ItemDescrip>I Descrip 4</ItemDescrip>
    </ItemNumber>
    <ItemNumber id="8">
    <Name>Tea</Name>
    <ItemDescrip>I Descrip 6</ItemDescrip>
    </ItemNumber>
    <ItemNumber id="9">
    <Name>Milk</Name>
    <ItemDescrip>I Descrip 7</ItemDescrip>
    </ItemNumber>
    </Item>
    <Title>The Title</Title>
    </HomeItem>
    <HomeItem id="5">
    <Time>1/8/2014 12:21:47 PM</Time>
    <HasNewAddress>Y</HasNewAddress>
    <AddressType>N</AddressType>
    <Description>myDescrip 8</Description>
    <Item/>
    <

    C# csharp xml

  • SHDocVw.ShellWindows .Quit does not stop process
    S SJR_1

    I have an application that closes all IE windows that have "MKR" string in the address when the application closes. The problem is that explorer.exe is still listed in the processes. How do I get rid of the process when I close the application? SR

    Visual Basic question help

  • FormView get control value
    S SJR_1

    In my code below I'm trying to have the user click on an image. Then pass that associated ID of that image (through XML it is associated). Any help is welcomed: <%@Page Language="VB" Debug="True" %> Protected Sub Formview1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewPageEventArgs) MsgBox(sender.ToString) End Sub Sub Get_Shape(ByVal Src As Object, ByVal Args As ImageMapEventArgs) Response.Write("<b>'" & Args.PostBackValue & "'</b> was clicked") Response.Write((Me.Formview1.FindControl("lblID").ToString() & " Label Value")) End Sub

    ID:
    XML file

    ASP.NET design debugging xml help

  • Get label Value
    S SJR_1

    In my code below I'm trying to have the user click on an image. Then pass that associated ID of that image (through XML it is associated). Any help is welcomed: <%@Page Language="VB" Debug="True" %> Protected Sub Formview1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewPageEventArgs) MsgBox(sender.ToString) End Sub Sub Get_Shape(ByVal Src As Object, ByVal Args As ImageMapEventArgs) Response.Write("<b>'" & Args.PostBackValue & "'</b> was clicked") Response.Write((Me.Formview1.FindControl("lblID").ToString() & " Label Value")) End Sub

    ID:
    XML file Thanks

    ASP.NET design debugging xml help

  • Reporting Services
    S SJR_1

    I've created a report with 3 drill down groups in a table control. Issue is when the parent group is not expanded the report has a gap (white space) between the first parent item in the group and the next parent item. -Stores +Joe's Grocery(10) +Mark's Grocery(1) +etc.... Any ideas how to control the row height by what is being displayed? Sue

    Database question help tutorial

  • Datatable Adding Row
    S SJR_1

    I'm returning a datatable from the DB, I need to add a row to that datatable for display only. That piece is working fine, the issue is I need that record to be the first record displayed in the cbo box. System.Data.DataRow dr = WorkTable.NewRow(); WorkTable.Rows.Add(new object[] {"ALL", "AL","","","","","","",-2,1,"UNKNOWN"}); cbo.DataSource = WorkTable; --I need to have the added line first in the combo box. Thanks

    C# database help

  • FileAttributes
    S SJR_1

    Can you take it one step further? I used this code to try to change the attribute: File.SetAttribute(path, FileAttributes. ); I could only find .ReadOnly and that's not what I want.

    C# help

  • FileAttributes
    S SJR_1

    I copy a "ReadOnly" file. I change it's name and then go to delete it. Problem it won't delete because it is ReadOnly (At least when I remove ReadOnly it deletes fine). This is the error I receive: ERROR in test System.UnauthorizedAccessException: Access to the path "c:\test\\test.dll" is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.File.Delete(String path) at Check.RunTest.DoRun(String path) in c:\project\runtest.cs:line 38 Here is my code: try { string[] testfiles = Directory.GetFiles(path); foreach( string testfile in testfiles) { string testFolderName = path + @"\" + Path.GetFileName(testfile); //Copy for short name - Name file T + extension File.Copy(testFolderName, path + @"\T" + Path.GetExtension(testfile)); File.Delete(testFolderName); RunProg(testFolderName,Path.GetExtension(testfile),Path.GetFileNameWithoutExtension(testfile) ); } } catch(Exception e) { Console.WriteLine("ERROR in RUNGliChk " + e.ToString()); } Thanks

    C# help

  • Command Line
    S SJR_1

    I'm trying to send commands from my C# project to the command line. The cmd is opening but the arguments are not being passed. Here is my code: System.Diagnostics.ProcessStartInfo psi = null; System.Diagnostics.Process proc = null; psi = new System.Diagnostics.ProcessStartInfo("cmd"); proc = new System.Diagnostics.Process(); proc.StartInfo = psi; System.Diagnostics.Process.Start(psi); psi.Arguments = @"ping dev12"; Application.DoEvents(); System.Diagnostics.Process.Start(psi); proc.WaitForExit(); Thanks.

    C# csharp
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups