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
K

kmuthuk

@kmuthuk
About
Posts
41
Topics
20
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Reading excel file in Vista x64
    K kmuthuk

    Thanks for the fast reply. It is x86. Moreover, dbCommand.ExecuteReader() does read the data.

    C# csharp visual-studio help question

  • Reading excel file in Vista x64
    K kmuthuk

    I'm trying to read an Excel file in C# Visual Studio 2008 using oldDb. My connection gets opened successfully, but oldDb adapter doesn't fill the datatable. Here is my code:

    private void openExcel()
    {
    string connectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=""C:\MyLocation\myFile.xls"";Extended Properties=""Excel 12.0;HDR=NO;""";
    OleDbConnection excelConnection = new OleDbConnection(connectionString);
    excelConnection.Open();

            string strSQL = "SELECT \* FROM \[Sheet1$\]";
    
            OleDbCommand dbCommand = new OleDbCommand(strSQL, excelConnection);
            OleDbDataAdapter dataAdapter = new OleDbDataAdapter(dbCommand);
    
            // create data table
            DataTable dTable = new DataTable();
            dataAdapter.Fill(dTable);
    
            aListBoxControl.DataSource = dTable;
    
            // dispose used objects
            dTable.Dispose();
            dataAdapter.Dispose();
            dbCommand.Dispose();
    
            excelConnection.Close();
            excelConnection.Dispose();
        }
    

    Could anyone please help me find this? Thanks in advance.

    C# csharp visual-studio help question

  • Why my TreeNodePopulate of TreeView contol is not fired?
    K kmuthuk

    I tried this. But still it is not working. Thanks for the quick response.

    ASP.NET help database sysadmin xml question

  • Why my TreeNodePopulate of TreeView contol is not fired?
    K kmuthuk

    Hi all, I have a treeview control, loading data using an xml file, and have a trigger [TreeView1_TreeNodePopulate] in the codebehind. Don't know for some reason it is not getting fired. Even though I'm raising an error in my trigger, it seems it doesn't work. Could anyone help me find this PLEASE? Here is my aspx:

        DataFile="Book.xml"
        runat="server">
    

    codebehind: protected void Page_Load(object sender, EventArgs e) { TreeView1.TreeNodePopulate += new TreeNodeEventHandler(TreeView1_TreeNodePopulate); } protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e) { throw new Exception("alsdjfla"); } Thanks A LOT. Muthu

    ASP.NET help database sysadmin xml question

  • Casting in LINQ
    K kmuthuk

    This works. :thumbsup: You guys are awesome!!! But I had to create another class for Employee as you mentioned, this is almost replica of mymodel.Employee. There is not much difference between them other than inheriting from INotifyPropertyChanging, INotifyPropertyChanged. Is that the one preventing from converting it to list using ToList()? Any thoughts? Thanks a lot. Muthu.

    LINQ help csharp linq question

  • Casting in LINQ
    K kmuthuk

    Hi guys I have a problem in LINQ. My code looks like this:

    var EmpDetails = from emp in mymodel.Employees
    select new
    {
    Id = emp.Id,
    EmpName = emp.Name
    };

    When I assign the result to a list of employees like this:

    List lstEmployee = EmpDetails;

    I'm getting an error saying "Cannot convert implicitly from System.Collections.Generic.List to System.Collections.IEnumerable....". How could I avoid this error? Any help pls... Thanks Muthu.

    LINQ help csharp linq question

  • Problem in updating records in MVC
    K kmuthuk

    [^] Actually, I was taking the code from the above article. UpdateFrom of Controller is part of framework, not my own method. This method has been replaced with UpdateModel in SP1. Thanks for your time. Happy Holidays -kmuthuk

    LINQ asp-net help csharp database debugging

  • Problem in updating records in MVC
    K kmuthuk

    UpdateModel is a method of Controller class which updates the MVC Model with the object and its values. In this case, product and product values which are from Request.Form

    LINQ asp-net help csharp database debugging

  • Problem in updating records in MVC
    K kmuthuk

    Hi there, I'm new to asp.net MVC like many of us. I'm trying to update data in the database through my asp.net MVC web application. Insert works fine but update. I'm using VS2008 SP1. Here is my code snippet, and actually I'm trying an example found in the net. :)

    public ActionResult UpdateMyProduct()
    {
    Models.Product product = new Models.Product();
    UpdateModel(product, Request.Form.AllKeys);
    northwind.SubmitChanges();
    return RedirectToAction("Detail", new { id = product.ProductID });
    }

    When I debug my model doesn't get changed. Am I missing anything? I appreciate any help. Thanks in advance. kmuthuk

    LINQ asp-net help csharp database debugging

  • How do I do partial update in multiple updatepanels with timer
    K kmuthuk

    Hi there I have multiple update panels and one timer on my page. But only one updatepanel has the trigger for the timer. What happens is all my update panel get refreshed. How do i make only one updatepanel that has timer control refreshed and not others? In this case, i don't want "updatepanel2" gets updated. Any help would be appreciated. thanks Muthu. Here is my code and page: =========================

    protected void Page_Load(object sender, EventArgs e) { Label2.Text = "UpdatePanel2 refreshed at: " + DateTime.Now.ToLongTimeString(); } protected void Timer1_Tick(object sender, EventArgs e) { Label1.Text = "UpdatePanel1 refreshed at: " + DateTime.Now.ToLongTimeString(); }

    ASP.NET question database help announcement

  • Not getting reference to System.Web.Script.Services.ScriptService
    K kmuthuk

    Hi There, I'm just starting learning ASP.NET AJAX. I'm creating a web service to access in my ASP.NET AJAX application. But I don't get ref to System.Web.Script.Services.ScriptService attribute in the webservice application. I'm using VS 2005 and installed ASP.NET AJAX 1.0. Don't know what I'm missing. Could you guys help me find this? thanks in advance Muthu.

    ASP.NET csharp asp-net visual-studio tools help

  • MenuItem selected value
    K kmuthuk

    Hi <asp:Menu ID="Menu1" runat="server" OnMenuItemClick="Menu1_MenuItemClick" Orientation="Horizontal"> <Items> <asp:MenuItem Text="Main Menu" Value="Test"> <asp:MenuItem Text="Second" Value="secondform.aspx"></asp:MenuItem> <asp:MenuItem Text="Third" Value="thirdform.aspx"></asp:MenuItem> </asp:MenuItem> </Items> </asp:Menu> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> and my Menu1_MenuItemClick event is: protected void Menu1_MenuItemClick(object sender, MenuEventArgs e) { Server.Transfer(((System.Web.UI.WebControls.Menu)(sender)).SelectedValue); } When I click the menu item, URL show the previous SelectedValue. Not the page is currently shown. Any help would be appreciated. Thanks Muthu

    ASP.NET design sysadmin help

  • Default Webservice URL
    K kmuthuk

    Hi I have created a webservice with a simple function HelloWorld. It works fine in the client application. How do I change the default url of the webservice that points to the asmx file? I know that I can change in Reference.cs in the client application. But I want to set the default url other than localhost to point to a server where my asmx file is. I am using VS 2003, C#. Thanks a lot in advance Muthu.

    C# question csharp visual-studio sysadmin

  • Default Webservice URL
    K kmuthuk

    Hi I have created a webservice with a simple function HelloWorld. It works fine in the client application. How do I change the default url of the webservice that points to the asmx file? I know that I can change in Reference.cs in the client application. But I want to set the default url other than localhost to point to a server where my asmx file is. I am using VS 2003, C#. Thanks a lot in advance Muthu.

    ASP.NET question csharp visual-studio sysadmin

  • Problem in getting class variable value in javascript/html [modified]
    K kmuthuk

    Yes. But it shows up in the page title tag. :( Not in link title tag. Muthu

    ASP.NET help javascript html com sysadmin

  • Problem in getting class variable value in javascript/html [modified]
    K kmuthuk

    Hi: Following is the sample code. The problem is I have a class called Test and a static variable testString="Hotmail" in it. I am refering this variable using <%> tag in my page. The text is not displayed in my page when I run it. But when the text is available in View-Source. I am getting the value of the static variable in tag. But not in <a></a> tag. Can anybody help on this? Thanks in advance. Muthu. <html xmlns="http://www.w3.org/1999/xhtml"> <body> <head runat="server"> <title><%=Test.testString %>

    -- modified at 15:57 Friday 16th February, 2007

    ASP.NET help javascript html com sysadmin

  • Problem in a webservice!!! [modified]
    K kmuthuk

    Hi guys I have created a webservice in VS2003, and I have some webmethods and classes in it. Those webmethods are shown in the client applicaiton after adding a web reference to it, but not the classes i created in web service. How do I make my classes in WS to display in the client application? Can anyone help in this? Here is the sample code: namespace WebserviceNS { public class MyService: System.Web.Services.WebService { [WebMethod] public void MyMethod() { //...// } } public class MyClass { public MyClass() { //...// } public void ClassMethod() { //...// } } } Here MyClass is not shown in the client side. Do I have to declare any attribute for displaying? Thanks Muthu.

    C# help question

  • How to set Property description?
    K kmuthuk

    I'm sorry. I didn't mention that it is for intellisense description. I tried both ///summary and System.ComponentModel I didn't get intellisense description in both cases. Thanks Muthu.

    C# help tutorial question

  • How to set Property description?
    K kmuthuk

    I'm sorry. I didn't mention that it is for intellisense description. I tried both ///summary and System.ComponentModel I didn't get intellisense description in both cases. Thanks Muthu.

    C# help tutorial question

  • How to set Property description?
    K kmuthuk

    Hi Guys How to set a description for a property in a class? I have found some articiles talking about method description using summary tag. summary.../summary. But it doesn't seem to be working for properties. Can any one help me on this? Thanks in advance. Muthu.

    C# help tutorial 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