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.
User Profile
Collapse
-
-
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.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..Leave a comment:
-
-
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.Leave a comment:
-
Change the last 3 lines to
xmlDoc.Save(Ser ver.MapPath("Se rializexml.xml" ));
Not necessary to create a new filestream..Leave a comment:
-
-
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";...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;
...Leave a comment:
-
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...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.Leave a comment:
-
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;
...Leave a comment:
-
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.
-MurugsLeave a comment:
-
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...Leave a comment:
-
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.Leave a comment:
-
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...Leave a comment:
-
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.
No activity results to display
Show More
Leave a comment: