Search:

Type: Posts; User: tagtech

Search: Search took 0.02 seconds.

  1. VS 2012 Re: 20171101 Write DataSet DataTable to Excel Spreadsheet

    This did not work for me as the Workbook / Worksheet reference kept giving me 'error: 80040154 Class not registered'. The solution for that seems to be 'ClosedXml' but I kept getting the following...
  2. VS 2012 20171101 Write DataSet DataTable to Excel Spreadsheet

    Using ADO with VB.Net I have been able to create a Form and write the GridView data to a file that can be saved as an Excel Spreadsheet. There are Save Dialog annoyances like that the file extension...
  3. VS 2012 [RESOLVED] DetailsView DropDownList on update loses value

    My last post dealt with data entry on initial input. This is the same issue but on changing or updating the data.
    I have a single DropDownList in a TemplateField in a DetailsView that is populated...
  4. VS 2012 Re: How to use If in DetailsView TemplateField DropDownList

    I removed the 'Text=(...Bind...)', 'DataSourceID', 'DataTextField' and 'DataValueField' from the DetailsView DropDownList. I then 'hard-coded' a 'Save' to the 'Value' for the SQL data record field in...
  5. VS 2012 Re: How to use If in DetailsView TemplateField DropDownList

    If the switch is set to 'SCANG', I want to use SqlDataSource3 to get the Air Force rank. If set to 'SCARNG' I want to use SqlDataSource4 for the Army rank. It would be great if I could just set the...
  6. VS 2012 [RESOLVED] How to use If in DetailsView TemplateField DropDownList

    I have a switch.

    When the DetailsView first appears for initial data entry the switch is already set.

    If the switch is set to ‘A’ I want to populate the DetailsView TemplateField DropDownList...
  7. VS 2012 Re: [RESOLVED] How to deal with null in Template field

    I've returned to zapping the existing SQL database PHONE field entries to make them ten blanks and added a 'If' to the previously written ItemInserting logic to make a null PHONE entry instead be...
  8. VS 2012 Re: [RESOLVED] How to deal with null in Template field

    ARRRGh! How do you mark as unresolved?
  9. VS 2012 Re: How to deal with null in Template field

    OK. So, I replaced all of the null phone numbers in the database with ten blanks and the simple parse works all the time with no 'If'. Thank you for the (too obvious for me) solution.
    Still; there...
  10. VS 2012 Re: How to deal with null in Template field

    Therefore:


    <asp:TextBox ID="txtPhArea" runat="server" MaxLength="3" Width="26px" Text='<%# IIf(Eval("PHONE") Is DBNull.Value, " ", Eval("PHONE").ToString().Substring(0, 3))%>' ></asp:TextBox>...
  11. VS 2012 Re: How to deal with null in Template field

    Heavy sigh back at you. Thanks for the lesson on .ToString and null; something else I didn't know. I know that the "thrid piece is OK" as if I abandon the 'If' statement, successfully 'build' and...
  12. VS 2012 Re: How to deal with null in Template field

    So, I have a valid action performed if the value / phone number is NOT null (false to the If) but need some valid action taken when the value / phone number IS null (true to the If).

    Can someone...
  13. VS 2012 Re: How to deal with null in Template field

    <asp:TextBox ID="txtPhArea" runat="server" MaxLength="3" Width="26px" Text='<%# If(Eval("PHONE").ToString() = "", String.Empty, Eval("PHONE").ToString().Substring(0, 3))%>' ></asp:TextBox>

    I now...
  14. VS 2012 Re: How to deal with null in Template field

    I agree in principle but in practice 'If' returns the two Errors: (1) Expression expected and (2) Expression is not a method.
  15. VS 2012 Re: How to deal with null in Template field

    <asp:TextBox ID="txtPhArea" runat="server" MaxLength="3" Width="26px" Text='<%# IIf(Eval("PHONE").ToString() = "", String.Empty, Eval("PHONE").ToString().Substring(0, 3))%>' ></asp:TextBox>

    Works...
  16. VS 2012 Re: How to deal with null in Template field

    Was not familiar with Ternary operator : 'condition ? first_expression : second_expression'; very cool.

    When I try the question mark (C#), "The '?' character cannot be used here." When I try...
  17. VS 2012 [RESOLVED] How to deal with null in Template field

    The following works exactly as I want except throws an error when the Phone number in SQL to be displayed is non-existent / null.



    <asp:TemplateField HeaderText="Phone Number"...
  18. Replies
    1
    Views
    1,065

    VS 2012 Re: What Event should I be using?

    The code should be:


    e.Values("SSN") = txtSSNAll.Text
  19. Replies
    1
    Views
    1,065

    VS 2012 [RESOLVED] What Event should I be using?

    It appears to me that as the code from 'ddlBranch_Selected' in the Code Behind works, so should the code from Record_Inserting. However, even though all of the fields in the Code Behind show the...
  20. VS 2012 Re: [RESOLVED] Pre - populate DetailsView with variables

    My mistake. The code from my last post only displayed the data in the DetailsView when it was shown, it did not write the data to the SQL record. Template fields were required to effect the results...
  21. VS 2012 Re: Pre - populate DetailsView with variables

    Where does one go to learn this? My multiple books didn't address this. You are exactly right and I thank you profusely for the answer!



    Protected Sub ddlBranch_Selected(ByVal sender As...
  22. VS 2012 Re: Pre - populate DetailsView with variables

    Thank you for the response. I have edited my original Code Behind to shove all commented lines of code - things that I have tried that have not worked - to the side so as to try to be more clear. ...
  23. VS 2012 [RESOLVED] Pre - populate DetailsView with variables

    I have a page with MultiView where the user selects whether the information input is to be for Army or Air personnel (they have different rank abbreviations) and when they do, the DetailsView should...
  24. Replies
    2
    Views
    572

    VS 2012 Re: SqlBulkCopy syntax error

    Indeed! Stared at it so long I couldn't see. If it was a snake it would have bit me. If it weren't for stupid mistakes I wouldn't make any at all. Don't get old! Etc.

    -Thanks
  25. Replies
    2
    Views
    572

    VS 2012 SqlBulkCopy syntax error

    In trying to use SQLBulkCopy to programmatically import Excel spreadsheet data into a SQL 2008 R2 table I get the following errors:

    (code)bulkExcelToSQL = New SQLBulkCopy(connSQL)(/code)
    Gets:...
  26. Replies
    11
    Views
    3,542

    VS 2010 Re: Menu control won't display horizontal

    Gep13,

    Excuse me. I saw, "you HAVE to have a root node" and quit reading. Mea culpa.
  27. Replies
    11
    Views
    3,542

    VS 2010 Re: Menu control won't display horizontal

    Stricknyn,

    As to, "1) I have a menu control which is using a SiteMapDataSource. This is bound to a .sitemap file. I have the orientation property set to horizontal, but for some strange reason...
  28. Replies
    11
    Views
    3,542

    VS 2010 Re: Menu control won't display horizontal

    Striknyn,

    To answer, "2) Is there a way to not display the root (Home) directory on my menu control? I only want to show Customer Support, Technician Support, Administration, and Site Map on...
Results 1 to 28 of 29



Click Here to Expand Forum to Full Width