|
ButtonName.Attributes.Add("onclick","alert('USER MSG');");
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
I cant get it. can you tell the solution to it
ArunVijay
|
|
|
|
|
Why not just define the button as pure HTML ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
ok i will try that. but what is the actual problem of using Asp.Net Button.
ArunVijay
|
|
|
|
|
Could be many things. I suspect at the core, it's that you're fighting the framework, which wants to add it's own onclick handler. Either way, it seems like the ASP.NET control is superfluous here.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hello friends,
In my app, i have a logout buton for which i have written the following code.
Session.Remove("UserID");
Session.RemoveAll();
Session.Abandon();
Response.redirect("home.aspx");
But when i press logout button i come back to the last page.
that should not be happen bcoz i am having a logincheck usercontrol on that page that cheks wheither Session("UserID") is null or not.......
Deepak Nigam
|
|
|
|
|
As per your comments
When User clicks log out button you are clearing Session and redirecting user to Home Page this what you have implemented ...
But it is behaving relatively against it
Deepak Nigam wrote: But when i press logout button i come back to the last page.
How are you going again back to last page ?
If you saying by clicking back Button then Page might be coming from browser Cache
Deepak Nigam wrote: bcoz i am having a logincheck usercontrol on that page that cheks wheither Session("UserID") is null or not.......
As Good practice you should check user credentials in every page
By creating a base which will check User Credentials in every Page LOad
This Page need extend from System.Web.UI.Page and your all Page should extends this Page
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I come back to last page by clicking the Back button on the browser.
Deepak Nigam
|
|
|
|
|
Deepak Nigam wrote: I come back to last page by clicking the Back button on the browser.
This will come from Cache. If you are checking the Credentials in every page then this should not cause any problem. e.g If user is in My Application Page where there are many controls like buttons etc to retrive some data. Now if i click Sign Out from this Page I will get redirect to Home Page ok Its fine
Now When user click back button browser will show My Application Page from Cache . Now if User clicks any server control in that page like button now Page Load will occure if you are checking Any user Credentials in My Application Page User wont be able to do anything he will get redirected to
Home Page
So its better to create a base class that will check user Credentials in its Page Load(What you are doing in user control) and your pages should extent this base page
Any how if you don't want ot Cache your page you will have to write this lines
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now); //or a date much earlier than current time
Add at the every page
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Thanks Sandeep..........
It works.
Deepak Nigam
|
|
|
|
|
hi,
how can we write codes inside a gridview. i want to check some conditions before displaying data. how can i do it.
|
|
|
|
|
Be Specific take a look,Here you will get many articles related with GridView
which may help you
http://gridviewguy.com/CategoryDetails.aspx?categoryID=7[^]
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
modified on Tuesday, April 22, 2008 2:55 AM
|
|
|
|
|
i tried every thing..... if i use refresh button it is not working..
i have given the Lblnote.text=""; in my reset button .. in reset button it is working nice... but if i press refresh icon in the browser it is not working...
|
|
|
|
|
ARGH !!! WHAT IS YOUR PROBLEM ???
If you can't work out what a 'reply' button is for, I doubt you're up to writing any code.
yardly wrote: have given the Lblnote.text=""; in my reset button ..
The core problem here is one of literacy. Perhaps if you just set enableviewstate="false" so the label does not remember it's text, you may be able to handle that ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
If you have already posted back then the refresh button will not work properly and will only refresh the content that has been brought back and not the orginal page
|
|
|
|
|
Hi,
I have a requirement in my asp.net page. Page contains some validation controls. am validating those controls on client side using CustomValidator. If I didn't select any radio button and click "Next" button, it is displying message on top of the page "Please select value". Its fine. but my problem is the page is not going to top position. Is there any tag in HTML to meet my requirement?
Thanks
|
|
|
|
|
You can set tags in your html and browse to them via anchor tags, I believe you use # as the start of the placemarker.
http://www.w3schools.com/tags/tag_a.asp[^]
Here is the HTML from the w3schools example:
<html>
<body>
<p>
<a href="#C4">See also Chapter 4</a>
</p>
<p>
<h2>Chapter 1</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 2</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 3</h2>
<p>This chapter explains ba bla bla</p>
<h2><a name="C4">Chapter 4</a></h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 5</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 6</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 7</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 8</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 9</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 10</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 11</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 12</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 13</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 14</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 15</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 16</h2>
<p>This chapter explains ba bla bla</p>
<h2>Chapter 17</h2>
<p>This chapter explains ba bla bla</p>
</body>
</html>
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi thanks for your reply. I know that one. Is there any solution for Button tag? if there is no validation errors it redirect to other page.
so with out using anchor tag is there any other solution?
Thanks.
|
|
|
|
|
|
Currently i m using ASP.NET with C#
(.net 2005, 2.0 framework)
When user enter some raw data in the address bar of IE, then it should redirect to a page.
for example,
If user enter "GOTO MY FIRST PAGE" and press enter, then the page should redirect to "first_page.aspx".
how to accomplish this?
is it possible one? - KARAN
|
|
|
|
|
I guess you don't understand what ASP.NET is and does ? You need to write an internet explorer add in toolbar to change how the browser behaves when given an english string like this. If you do some reading on ASP.NET, you'll come to understand why ASP.NET cannot make IE do what you want.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi,
lblnote.Text = "Your Profile Was Updated";
i using label to the show message...
but if i press refresh button in the browser, the error message should disable from my aspx page...
and also i tried in script:
Page.RegisterStartupScript("as", " alert('Your Profile Was Updated')");
but it is showing exclamation symbol.....
i dont want this symbol in my popup message box. plzany one tell me the answer...
sorry to ask this tell how to replay message for u
|
|
|
|
|
Please answer within the same thread that you are already being helped.
Set the lblnote.Text to be string.Empty before the event handler that resets it to the text you want.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi
in my propject i want to show some data without gridview control. also i want to include paging in it. is there any third party controls for it. please help me to do it.
thanks in advance
|
|
|
|
|
Yes, there are third party controls. Or, you could write your own. An obvious way is to write a proc that returns one page at a time, and put the page number on the URL.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|