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
P

pmarfleet

@pmarfleet
About
Posts
1.5k
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ASP.NET - Create a questionnaire/test on the fly.
    P pmarfleet

    Yes. You can use a data binding expression to do this. Below I have posted the code for a page that displays a hierarchical list of customers with orders from the sample Northwind database using ADO.NET Entity Framework. I use a databinding expression in the child list control displaying order details to display the customer's country against every order. The databinding expression is a bit clumsy (lots of calls to .Parent) but it works. ASPX code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

    • <%#Eval("CustomerID") %>
    • <%#Eval("OrderID") %> <%#((NorthwindModel.Customers)((ListViewDataItem)Container.Parent.Parent.Parent).DataItem).Country %>

    Code-behind file: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { using (NorthwindModel.NorthwindEntities context = new NorthwindModel.NorthwindEntities()) { ListView1.DataSource = from c in context.Customers orderby c.CustomerID select c; ListView1.DataBind(); } } protected void ListView1_ItemDataBound(object sender, ListViewItemEventArgs e) { string customerID = ((NorthwindModel.Customer

    ASP.NET csharp html asp-net database help

  • Reading Excel Data
    P pmarfleet

    It sounds like this is an issue with the Excel driver attempting to guess the data type for the column. The driver has probably made the decision, based on sampling an initial number of rows (default is 8) that the column should contain text values. Values that look like they belong to another data type will be disregarded and show up as NULL. If you add the element 'IMEX=1' to your connection string this tells the driver to treat intermixed data in a column as text (see here[^]) If you need to increase the number of rows that the driver uses to guess the data type for a column, you need to make a registry change. See this article[^] for more information.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET csharp question

  • The best overloaded method match for 'System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(string, string)' has some invalid arguments
    P pmarfleet

    amistry_petlad wrote:

    Line 27: Line 28: objLogin = new STR_USERS(); Line 29: objLogin.PASSWORD_PRO = FormsAuthentication.HashPasswordForStoringInConfigFile(txtPassword, "MD5"); Line 30: objLogin.USERNAME_PRO = FormsAuthentication.HashPasswordForStoringInConfigFile(txtUserName,"MD5"); Line 31:

    Assuming txtPassword and txtUserName are TextBox controls, you need to call the .Text property on them. If you attempt, as you have done, to pass references to the controls themselves, you get a compile-time error because the method was expecting an instance of a string, not a TextBox control.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET security regex help

  • ASP.NET - Create a questionnaire/test on the fly.
    P pmarfleet

    Bind your parent ListView control that is displaying the categories to a SELECT query that fetches these categories. Handle the ItemDataBound[^] event for your parent ListView control. This will fire each time data for an individual category is bound to the list control. The following code demonstrates how to handle this event and use LINQ to get all orders for the child list control associated with a customer from the parent list control. It uses data from the Northwind database. The parent list control is bound to a SqlDataSource control.

    protected void ListView1_ItemDataBound(object sender, ListViewItemEventArgs e)
    {
    string customerID = ((System.Data.DataRowView)((ListViewDataItem)e.Item).DataItem)["CustomerID"].ToString();
    ListView listView2 = e.Item.FindControl("ListView2") as ListView;

        using (NorthwindModel.NorthwindEntities context = new NorthwindModel.NorthwindEntities())
        {
            var orders = (from o in context.Orders
                          where o.Customers.CustomerID == customerID
                          select o).ToList();
    
            listView2.DataSource = orders;
            listView2.DataBind();
        }
    }
    

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET csharp html asp-net database help

  • ASP.NET - Create a questionnaire/test on the fly.
    P pmarfleet

    To display a list of questions grouped by category you would need 2 ListView controls, one nested inside the ItemTemplate of the other. Have a look at this[^] open-source ASP.NET Questionnaire application. I've used it in the past as a building-block for creating a survey website.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET csharp html asp-net database help

  • How do I convert an MsAccess Database into a MySQL Database and is their a free Utility to do so?
    P pmarfleet

    A quick internet search threw up this[^]

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    Database question database mysql tools

  • ASP.NET - Create a questionnaire/test on the fly.
    P pmarfleet

    The easiest way to approach this would be to use a data-bound control like a ListView to display the questions and corresponding input controls. Within the ItemTemplate for your data-bound control, you can declare an instance of each type of input control you want to use (TextBox, CheckBox etc.) Then at run-time, override the ItemDataBound event for your control and show/hide each input control for the current question being rendered as appropriate. On postback, to save the user's input, loop through the Items collection for the control, use FindControl to locate the correct control containing the user's input, then save the information to your database (or whatever)

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET csharp html asp-net database help

  • Copy from one table into another
    P pmarfleet

    .NET- India wrote:

    How to copy database design of a table into another table without copying its values

    If you want to do this manually, you can do this through Management Studio by right-clicking a table and selecting 'Script Table As... -> CREATE TO'. If you want do do it in code, you could use SMO[^] to obtain metadata for a particular table and create another table based on this metadata.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    Database database design tutorial

  • question
    P pmarfleet

    Repeating the same question over and over again won't help you get an answer :zzz:

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET csharp sysadmin tutorial question

  • Capturing the UN-UPDATED records
    P pmarfleet

    John Sundar wrote:

    once if its go for "CATCH" block, how it can proceed others? i.e, if record 2 fails, will it proceed other records and complete the whole FOR loop????

    The try/catch block is within the body of the loop. If an error occurs during one iteration of the loop, it will be caught and the code will proceed to subsequent iterations.

    John Sundar wrote:

    i tried.. but getting error...

    You need to post details of the error if you want help. We're not mindreaders.

    John Sundar wrote:

    how to achieve it?

    Post details of your error, and maybe you'll get some help.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET help tutorial question announcement

  • how is run
    P pmarfleet

    sugunavathysubramanian wrote:

    we are not opening the website.ok how to get system date ..do u get my point.

    How do you expect the code to be executed if the website isn't running? You do understand how websites, the internet and the HTTP protocol works, don't you?

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET database

  • Multiple Data Entry
    P pmarfleet

    SamRST wrote:

    i want to enter multiple data's , like sales invoice. Does anybody have idea. Page should not postback.

    Read the forum rules[^], paying particular attention to no. 2. If you don't understand the basic principles of developing ASP.NET data entry applications, posting questions on a forum isn't going to help you. If this a commercial project, does your company know that you don't have the skills to complete it? The only advice I can give you is to go away, read a few books and and learn your craft.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET sales

  • Multiple Data Entry
    P pmarfleet

    rajkumar.3 wrote:

    searching in google every body know it dude

    I beg to differ. A lot of the questions posted on this forum, including this one, indicate that the posters don't i) know how to use Google and ii) have the first clue how to approach a problem. This forum provides answers to specific programming questions. It isn't here to provide complete solutions to projects. The forum rules clearly state this.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET sales

  • Creating a Word Document
    P pmarfleet

    Search the web for 'Word automation' and you'll find plenty of information on controlling Word programmatically.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET help

  • question
    P pmarfleet

    nithydurai wrote:

    tel me something about window service

    It's a service. It runs in Windows. Any more information, I suggest you search the web or buy a book. Oh, and in future, read the forum rules before you post, particularly numbers 2 & 3.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET csharp question tutorial

  • How to open a XML file without validating?
    P pmarfleet

    If you don't want to validate the XML file against a DTD, why are you using the XmlValidatingReader at all? Just remove it. BTW, unless you are still using .NET 1.x, the XmlValidatingReader[^] is now obsolete. You should use the validation options available on the XmlReader class instead.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    C# xml help tutorial question

  • Convert date formate 4th april 2008 to default date formate
    P pmarfleet

    The CONVERT function has a number of options for different date formats. Read the documentation and choose the most appropriate format for your requirements.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    Database tutorial

  • Runtime Error after publishing aspx page!!!
    P pmarfleet

    You need to disable custom errors to view the actual error message. Follow the instructions provided to you in the error message to do this.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    ASP.NET help csharp visual-studio sysadmin security

  • Does anyone know how to take a XML file and store it into a C++ structure?
    P pmarfleet

    Mike A. Fowler wrote:

    What does the .xml file look like?

    Like the XML fragment you included in your original post, minus the ENDOFXML element.

    Mike A. Fowler wrote:

    Doesn't it have to have a reference to the .xsl file?

    Not necessarily. You can directly link an XML document to an XSL stylesheet by including the following declaration below your XML declaration:

    <?xml-stylesheet type="text/xsl" href="mystylesheet.xsl"?>

    If the XML file is viewed in a browser like IE, the browser will perform the transformation and display the result.

    Mike A. Fowler wrote:

    Do both the .xml and the .xsl have to co-exist in the same file?

    No, the XML and XSL documents reside in separate files. It wouldn't make any sense for the two to be in the same file. The stylesheet would be tightly coupled to a single XML document and couldn't be applied to other documents.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    XML / XSL tutorial c++ xml question announcement

  • C++ to C# [modified]
    P pmarfleet

    sreecahitu wrote:

    We are going to start a migration project, i,e from C++ to C#, i do not have any idea on C++ absoultely

    How can you possibly undertake this work if you don't understand C++? Do you seriously expect to gain an understanding of such a complex language from a single forum post? Your company has serious problems if people are assigned to projects that they don't have the technical skills for.

    Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

    C# csharp c++ oop help question
  • Login

  • Don't have an account? Register

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