|
And I need to win the lottery. Neither are likely to happen anytime soon.
The way this works is you first try to work it out for yourself and then, when you get really, really stuck you ask for help based on what you've already attempted. Or you trawl through Google - there is bound to be someone who has already done this and posted some info about it. Posting this here either means you are too lazy to figure it out for yourself or it is homework.Tychotics
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
Am new to this topic & after trying a lot in google, since i couldn't get any proper solutions for my requirement i have asked to provide the URL or what u know about this if & only if u have found that could be helpful for novice users.
|
|
|
|
|
antony beula wrote: i have asked to provide the URL
No you didn't, you asked for code.Tychotics
"The dinosaurs became extinct because they didn't have a space program. And if we become extinct because we don't have a space program, it'll serve us right!"
Larry Niven
|
|
|
|
|
How to refresh content place holder only without refreshing whole master page?
I already used UpdatePanel in Content Page.
|
|
|
|
|
When do you want to update the content page ? Is it automatically or with some event ?
As you have already used UpdatePanel for content page, you need to do one more thing, Make the UpdateMode of that UpdatePanel as "Conditional ". And when ever you want to update the Content Place holder, call UpdatePanel1.Update() .
I assumed, Updatepanel1 is the name of Updatepanel for your content placeholder.
Let me know if you need any more information.Cheers !
Abhijit
Codeproject MVP
|
|
|
|
|
I fixed UpdateMode Conditional in all content page and written code on Load event of Master Page as -
((UpdatePanel)ContentPlaceHolder1.FindControl("UpdatePanel1")).Update();
But it still refreshing content pages. Is there any problem with by code?
|
|
|
|
|
I didn't get your point. You want to refresh the content page only. Isn't it ? Cheers !
Abhijit
Codeproject MVP
|
|
|
|
|
Manish_84 wrote: ((UpdatePanel)ContentPlaceHolder1.FindControl("UpdatePanel1")).Update();
But it still refreshing content pages.
You just wrote a code here to update/fire your Content page update panel in line 1 and in line 2 you are asking why is it refreshing. Is there a typo?
Secondly, if you wanted just your content page to refesh, why are you writing your code of updating the update panel in Master page? Is the trigger to update content page present in Master page?
|
|
|
|
|
Yes. I am also confused from his post Cheers !
Abhijit
Codeproject MVP
|
|
|
|
|
Assuming you have everything else correct, do you have a ScriptManager control on your page?
I avoid AJAX when I can (never had the time to climb the learning curve) but when I get pages behaving like a normal ASPX page, it is usually because I didn't include the manager.
|
|
|
|
|
Hi..
In my project while i m running the application...whn i m going a particular aspx page and thn click the enter button of keyboard the page is redirecting to another how to stop this without javascript.I need code for this.
Thanks in advance.
With regards.
Ch.Gayatri
|
|
|
|
|
Ch.Gayatri Subudhi wrote: .whn i m going a particular aspx page and thn click the enter button of keyboard the page is redirecting to another
I guess, on that page there are some default control has been set, and which used to redirect you page to another page. As this is the default control and also Focused, so when some one Press Enter Enter key, it is redirecting to another page.
As you don't want to use JavaScript, You can cange the default control of that page. Or focus any control which is not redirecting to any page.
Hope you got my point. Please let me know if you need any help.Cheers !
Abhijit
Codeproject MVP
|
|
|
|
|
But in my whole application i used default button in log in page...but where in other page its redirecting to other.while clicking enter button of keyboard.
|
|
|
|
|
Ch.Gayatri Subudhi wrote: But in my whole application i used default button in log in page...but where in other page its redirecting to other.
What does it mean? I didn't get your point.
As I already suggested, if Default button is not necessary, you can create one blank control (may be textbox),hide it and focus it on page load. Cheers !
Abhijit
Codeproject MVP
|
|
|
|
|
Sir even though i used javascrip where in my app i used masterpage...still its not working
|
|
|
|
|
Ch.Gayatri Subudhi wrote: Sir even though i used javascrip where in my app i used masterpage...still its not working
What you have done with javascript ? Can you please show us the code ?Cheers !
Abhijit
Codeproject MVP
|
|
|
|
|
<script language="JavaScript">
function disableEnterKey(e)
{
var key;
if(window.event)
key = window.event.keyCode;
else
key = e.which;
return (key != 13);
}
</script>
wrote this in ur masterpage
<body OnKeyPress="return disableKeyPress(event)">
like this i wrote in masterpage
|
|
|
|
|
sir..wht is other way to stop this issue.
|
|
|
|
|
Looks like your page is having a default button specified. Thus on click of it, that defualt button event is called.
Either remove the default button of the page. If you are not setting it or unable to find one the try this:
Use a dummy button in your page and set that button as Default button. Don't attach any handler to it(write reutrn false; in button's OnClientClick) and set the display style or visibility to false.
|
|
|
|
|
But in my whole application i used default button in log in page...but where in other page its redirecting to other.while clicking enter button of keyboard.but i did not sued ant default button to ant other pages accept login page
|
|
|
|
|
looks like you set your Default Button in MasterPage. is that so? that can only carry this to all other pages though you intend to use it in Login page only.
Try putting the default button thing in Login Content page.
|
|
|
|
|
but in my login page it wont hv masterpage...rest of pages i used master page...
|
|
|
|
|
I would provide some input. Please check whether it actually helps in your scenario.
if you are in "Page.aspx" where on keyboard "enter button" hit takes you to "Wrong.aspx". But you actually want to visit "Right.aspx". Please do following steps,
Step 1. In Page.apsx, put "method" and "action" attribute in tag as mentioned here
<form id="form1" runat="server" method="post" action="Right.aspx">
<!-- other existing HTML code for UI -->
<asp:Button ID="Button1" runat="server" Text="Button" />
</form>
Step 2.
in @Page directive in Page.aspx, add "EnableViewStateMac" attribute as the following if not already added
EnableViewStateMac="false"
Step 3. In @page directive in "Right.aspx" as set EnableViewStateMac = false.
Now hitting "enter button" from keyboard while you are in Page.aspx, will always nagivate you to "Right.aspx" instead of "Wrong.aspx".
Please let me know if it helps you.Thanks,
Arindam D Tewary
|
|
|
|
|
while i m running my app...the flow is okay...but whn i clicked the enter button of keyboard i want to stop that action...becoz of that its redirect to anthor page...i need to stay the same page...even i m using masterpage
|
|
|
|
|
Ch.Gayatri Subudhi wrote: but whn i clicked the enter button of keyboard i want to stop that
Did you mean from clicking mouse things are working but you want to stop doing any thing from "keyboard enter button" hit?Thanks,
Arindam D Tewary
|
|
|
|