|
Hi,
Remember that static members belongs to a class. Therefore whatever you do to it in a class will be remembered for the time that this application is running in it's own session (will not influence another user). But the problem is it will be reset when the application close.
Regards,
Elizma
|
|
|
|
|
Thanks..But I tried something like this..
static int i;
protected void Page_Load(object sender, EventArgs e){}protected void Button1_Click(object sender, EventArgs e)
{ i=i+1;
TextBox1.Text=i.ToString();
}
For each Button Click event, the value of "i" is incremented and displayed in the TextBox.
I have clicked the button 5 times and the text box shows 5 in it.
At this moment,when I opened another browse , copy - paste the same url
and I tried to click the button, it shows "6" in it.
Then why it working when i am opening the page in new browser window..My question is whether making it static will make it remember at server during subsequent page postbacks or not?
Warm Regards,
Rahul
|
|
|
|
|
according to me value of static variables is maintained at server till that variable is not assigned null value or u need to call the destructor to relase the memory occupied by that variable.Else server will maintain the varaibles value even if u close the application from client end.
|
|
|
|
|
Http is stateless, ASP.NET is not.
Http is the communication protocol that helps the browser and the web server talk and exchange HTML. Your ASP.NET website is also an application, but it runs inside an application domain within IIS.
SG
|
|
|
|
|
Thanks for answer..so static variable will be maintained at server during subsequent page requests..right?
|
|
|
|
|
|
Iam wriiten the code for ASp.Net 2.0 using the Control TRee View and database to display in a tree view.
But when I run the code Iam getting an error as
"The file web.sitemap required by XmlSiteMapProvider does not exist."
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The file web.sitemap required by XmlSiteMapProvider does not exist.
|
|
|
|
|
Do you have a Web.sitemap file at the root level of your web site virtual folder ?
This must be a valid XML file with your menu description.
Regards,
Satips.
|
|
|
|
|
Can u tell me how this could be checked abnd if not present what i should do?
|
|
|
|
|
first u put a SiteMapDataSource control on page.
then set it to ur Treeviews DataSourceID.
Before this make a web.sitemap and assign data what u want to show in Treeview.
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
Please stop using 'urgent' in your message titles.
______________________
stuff + cats = awesome
|
|
|
|
|
i want to open a website e.g. youtube.com inside my site.is there any way to do it.
if yes?
then please help me how i can do it.
i really need ur help.
alok tripathi
|
|
|
|
|
Hi,
Put an IFRAME in your page and set its src property to the desired URL.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Hi Alok
WE can use hyperlink (type the nameof the web site in ur form then drag the mouse right click select the option make hyperlink) to open any web site from your page, But exactly what u want i didnt got (Is it like in the same window u want to open ??)
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
yes i want it to open it inside same window
alok tripathi
|
|
|
|
|
Go with IFrame and set the Src Property to the Desired URl which you want to Open in the Site.
Regards,
Satips.
|
|
|
|
|
Hi all
In a asp.net form i have many controls. So i want user to fill all fields with proper data so i want to validate those controls. I tried writing a code like this but it didn't work
If TxtFname.Text = "" Then
MsgBox("Enter The First Name")
End If
Server Error in '/WebApplication2' Application.
--------------------------------------------------------------------------------
It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application
Can any tell me the code that i need to implement here. like fields should not be empty, and in text boxes user should not be able to enter numeric value and vice versa.
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
Hi,
Get it Get It
You can not use windows messagebox in web application.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
hi frnd,
The best to validate the textbox in web application is use
JAVAScript
just try out following code in soure
type in
after <title>
function ClickMe()
{
if document.getElementById("txtFName").value==""
{
alert("Please Enter FName");
return false;
}
}
Call this method on click
regards,
koolprasad2003
-- modified at 3:25 Wednesday 13th June, 2007
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
koolprasad2003 wrote: If the message is useful for U then please Rate This message...
people are there to catch you for this sentence
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
You can use validation controls provided by .Net or can also use javascript for that purpose. Normal validation should be done on client side.
Apurva Kaushal
|
|
|
|
|
Thanks for the suggestion. I am using the .net controls Required field Validator and all. Can i get ur id pl
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
If you want to send a mail to me then you can use email link below my post. The message will come to me.
Apurva Kaushal
|
|
|
|
|
OK thanks
Prakash Mishra(Banglore,India)
|
|
|
|
|
Always welcome..
Apurva Kaushal
|
|
|
|