User Profile

Collapse

Profile Sidebar

Collapse
Murugs
Murugs
Last Activity: Mar 24 '10, 05:44 PM
Joined: Nov 5 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Murugs
    replied to Newvalues in a gridview
    in .NET
    Hi,
    //GridView1.DataK eyNames = New String() {"Institution_i d", "Year_id", "field1"}
    what exactly u r trying to do in this line.
    Is all the three columns are primary columns?
    r u using the below code to get datakey values?
    //Gridview1.DataK eys
    can you post all the code so that we can sense the exact error?

    Thanks,
    Murugs.
    See more | Go to post

    Leave a comment:


  • Murugs
    replied to Newvalues in a gridview
    in .NET
    Can you put the sample code?
    See more | Go to post

    Leave a comment:


  • Hi,
    Can you add more details abt ur requirement so that we can give better solution.
    You can able to find which button clicked in page load using request event argument.
    You first need to send the event argument from javascript and then accessing it from server side.

    Thanks,
    Murugs.
    See more | Go to post

    Leave a comment:


  • int ParamID=0;//Initialize with default value
    if (Session["ParamID"] != null)
    {
    ParamID=Convert .ToInt16(Sessio n["ParamID"]);
    }

    hope this will helps you..
    See more | Go to post

    Leave a comment:


  • Murugs
    replied to confirmation box in asp.net
    in .NET
    can you tell me your exact requirement?
    See more | Go to post

    Leave a comment:


  • Murugs
    replied to confirmation box in asp.net
    in .NET
    Try the below code within ur javascript function.It will promp u for the confirmation box.

    if (confirm("Confi rmation Message."))
    {
    Code for Yes section;
    }
    else
    {
    code for No section;
    }.
    Hope it will helps u.
    See more | Go to post

    Leave a comment:


  • Change the last 3 lines to

    xmlDoc.Save(Ser ver.MapPath("Se rializexml.xml" ));

    Not necessary to create a new filestream..
    See more | Go to post

    Leave a comment:


  • Murugs
    replied to How static variables are stored?
    in .NET
    Atlast got it.its all coz of wrong testing..
    Thanks Plater..
    See more | Go to post

    Leave a comment:


  • Murugs
    replied to How static variables are stored?
    in .NET
    Hi Plater,
    Just update the static variable on some condition and check it again.
    its maintaining different values.
    check the below code.

    GlobalVariables .userName = "Value not changed";
    Response.Write( GlobalVariables .userName);
    if (Request.QueryS tring["Id"] == "1")
    {
    GlobalVariables .userName="valu e changed";...
    See more | Go to post

    Leave a comment:


  • Try below the code.

    using System;
    using System.Data;
    using System.Configur ation;
    using System.Collecti ons;
    using System.Web;
    using System.Web.Secu rity;
    using System.Web.UI;
    using System.Web.UI.W ebControls;
    using System.Web.UI.W ebControls.WebP arts;
    using System.Web.UI.H tmlControls;
    using System.Xml.XPat h;
    using System.Xml;
    using System.Xml.Xsl;
    ...
    See more | Go to post

    Leave a comment:


  • Murugs
    replied to How static variables are stored?
    in .NET
    As you said,after execution of line 3 the variable myVal will hold only the value "third".But in my case its maintaining different values.
    Thats why i confused abt the storage of Static variables...
    See more | Go to post

    Leave a comment:


  • Try the below code.
    dv.RowFilter = "(Isnull(col1,' Null Column') = 'Null Column' or Isnull(col2,'Nu ll Column') = 'Null Column') or (col1='TEST' and col2='TEST')";
    Hope it will solve ur problem.

    Cheers,
    Murugs.
    See more | Go to post

    Leave a comment:


  • Murugs
    replied to How static variables are stored?
    in .NET
    Please just do this sample page

    class GlobalVariables
    {
    public static string userName;
    public static string sessionValue;
    }

    aspx page
    //Have a textbox by the name txtUserName to allow the user to enter somevalue
    //Have a button by the name btnSubmit
    using System;
    using System.Data;
    using System.Configur ation;
    using System.Collecti ons;
    ...
    See more | Go to post

    Leave a comment:


  • Murugs
    replied to How static variables are stored?
    in .NET
    Hi r035198x ,
    Yes that is possible.we can store instance specific data in static variables.
    I have done a small poc on that and its working.

    -Murugs
    See more | Go to post

    Leave a comment:


  • Murugs
    replied to How static variables are stored?
    in .NET
    HI Plater,
    You have misunderstood my question.
    As you said server is running the application,how does the server handles static variable in the above scenorio.Thats my question.
    Yes you are correct.we can use session object for that purpose.
    My next question is which one is performance wise better (session or static variable) if both can able to maintain instance specific data's.
    Thats why i am little bit confused...
    See more | Go to post

    Leave a comment:


  • Murugs
    replied to How static variables are stored?
    in .NET
    Same application opened in 2 different browsers.not 2 different application.
    Say for example,I have opened 2 internet explorer.now i am accessing thescripts.com in both the IE's.
    See more | Go to post

    Leave a comment:


  • Murugs
    replied to How static variables are stored?
    in .NET
    Thanks for your reply.
    I meant application instance not class instance.

    Class GlobalVariables
    {
    public static string userName;
    }

    consider we have one login page.
    In Login.aspx.cs page i am assigning some values for userName like

    GlobalVariables .userName=txtUs erName.Text //saving the user entered text to that static variable.

    now the single static variable...
    See more | Go to post

    Leave a comment:


  • Murugs
    started a topic How static variables are stored?
    in .NET

    How static variables are stored?

    Friends,
    Jus want to know how static variables r stored and accessed.
    I believe that static variable will maintain only single copy per application domain.
    If so then how does it allow a single static variable to have different values for diff instance.


    Cheers,
    Murugs.
    See more | Go to post
No activity results to display
Show More
Working...