Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Auto scroll the page?

Reply
Thread Tools

Auto scroll the page?

 
 
=?Utf-8?B?RGFuaWVs?=
Guest
Posts: n/a
 
      09-30-2005
Hi All,
i have problem to scroll the page the the specific section of the page after
click a command button.

I have tried using <a name="f"> and use response.redirect("xxxx.aspx?#f").
Although it works but i dont wan to reload the page.

I also used hyperlink to goto the "f" section. It works good without fire an
event (which cause reload page) but, the problem, i wan to click on a command
button and not the hyperlink.

So, how to accomplish it by clicking only the command button and direct me
to the "f" section without fire any event.

Any ideas? guiline?

Thank you in advance.
Best regards,
OCurnos
 
Reply With Quote
 
 
 
 
Pavan
Guest
Posts: n/a
 
      09-30-2005
Hi,

As far as my understanding, you are using asp.net command button to scroll
the page. If so, use HTML button instead.

And in page_Init event, add the following code.

(Let us say name of the HTML Button is btnScroll)

Protected void Page_Init(object sender, EventArgs e)

{

btnScroll.Attributes.Add("Href","xyz.aspx?#f");

}

I hope this will help you.

Regards,

Pavan


"Daniel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
> i have problem to scroll the page the the specific section of the page
> after
> click a command button.
>
> I have tried using <a name="f"> and use response.redirect("xxxx.aspx?#f").
> Although it works but i dont wan to reload the page.
>
> I also used hyperlink to goto the "f" section. It works good without fire
> an
> event (which cause reload page) but, the problem, i wan to click on a
> command
> button and not the hyperlink.
>
> So, how to accomplish it by clicking only the command button and direct me
> to the "f" section without fire any event.
>
> Any ideas? guiline?
>
> Thank you in advance.
> Best regards,
> OCurnos



 
Reply With Quote
 
 
 
 
=?Utf-8?B?RGFuaWVs?=
Guest
Posts: n/a
 
      09-30-2005
Hi Pavan,
the code is not working ?? am i miss something??

thank you

"Pavan" wrote:

> Hi,
>
> As far as my understanding, you are using asp.net command button to scroll
> the page. If so, use HTML button instead.
>
> And in page_Init event, add the following code.
>
> (Let us say name of the HTML Button is btnScroll)
>
> Protected void Page_Init(object sender, EventArgs e)
>
> {
>
> btnScroll.Attributes.Add("Href","xyz.aspx?#f");
>
> }
>
> I hope this will help you.
>
> Regards,
>
> Pavan
>
>
> "Daniel" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi All,
> > i have problem to scroll the page the the specific section of the page
> > after
> > click a command button.
> >
> > I have tried using <a name="f"> and use response.redirect("xxxx.aspx?#f").
> > Although it works but i dont wan to reload the page.
> >
> > I also used hyperlink to goto the "f" section. It works good without fire
> > an
> > event (which cause reload page) but, the problem, i wan to click on a
> > command
> > button and not the hyperlink.
> >
> > So, how to accomplish it by clicking only the command button and direct me
> > to the "f" section without fire any event.
> >
> > Any ideas? guiline?
> >
> > Thank you in advance.
> > Best regards,
> > OCurnos

>
>
>

 
Reply With Quote
 
S. Justin Gengo
Guest
Posts: n/a
 
      09-30-2005
Daniel,

If you'd like some already working code I have a "ScrollToElement" method in
a Javascript component that I give away free on my website (everything there
is free). If you click on the "Code Library" link at the top of
www.aboutfortunate.com and then click the "Javascript" button in the menu on
the left you can download all source code for the component as a Visual
Studio.Net 2003 project. Even if you don't want to use the whole javascript
component (it has a lot of other useful scripts in it) you could always
strip out the ScrollToElement code. It lets you specify what control on the
page to scroll to, or you can give it a page element name as a string in
case you want to scroll to something that isn't a .Net control.

There is also a help file that explains/gives examples of use of all
controls available on my website.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Daniel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Pavan,
> the code is not working ?? am i miss something??
>
> thank you
>
> "Pavan" wrote:
>
>> Hi,
>>
>> As far as my understanding, you are using asp.net command button to
>> scroll
>> the page. If so, use HTML button instead.
>>
>> And in page_Init event, add the following code.
>>
>> (Let us say name of the HTML Button is btnScroll)
>>
>> Protected void Page_Init(object sender, EventArgs e)
>>
>> {
>>
>> btnScroll.Attributes.Add("Href","xyz.aspx?#f");
>>
>> }
>>
>> I hope this will help you.
>>
>> Regards,
>>
>> Pavan
>>
>>
>> "Daniel" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Hi All,
>> > i have problem to scroll the page the the specific section of the page
>> > after
>> > click a command button.
>> >
>> > I have tried using <a name="f"> and use
>> > response.redirect("xxxx.aspx?#f").
>> > Although it works but i dont wan to reload the page.
>> >
>> > I also used hyperlink to goto the "f" section. It works good without
>> > fire
>> > an
>> > event (which cause reload page) but, the problem, i wan to click on a
>> > command
>> > button and not the hyperlink.
>> >
>> > So, how to accomplish it by clicking only the command button and direct
>> > me
>> > to the "f" section without fire any event.
>> >
>> > Any ideas? guiline?
>> >
>> > Thank you in advance.
>> > Best regards,
>> > OCurnos

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?RGFuaWVs?=
Guest
Posts: n/a
 
      10-03-2005
Thanks Justin.

"S. Justin Gengo" wrote:

> Daniel,
>
> If you'd like some already working code I have a "ScrollToElement" method in
> a Javascript component that I give away free on my website (everything there
> is free). If you click on the "Code Library" link at the top of
> www.aboutfortunate.com and then click the "Javascript" button in the menu on
> the left you can download all source code for the component as a Visual
> Studio.Net 2003 project. Even if you don't want to use the whole javascript
> component (it has a lot of other useful scripts in it) you could always
> strip out the ScrollToElement code. It lets you specify what control on the
> page to scroll to, or you can give it a page element name as a string in
> case you want to scroll to something that isn't a .Net control.
>
> There is also a help file that explains/gives examples of use of all
> controls available on my website.
>
> --
> Sincerely,
>
> S. Justin Gengo, MCP
> Web Developer / Programmer
>
> www.aboutfortunate.com
>
> "Out of chaos comes order."
> Nietzsche
> "Daniel" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi Pavan,
> > the code is not working ?? am i miss something??
> >
> > thank you
> >
> > "Pavan" wrote:
> >
> >> Hi,
> >>
> >> As far as my understanding, you are using asp.net command button to
> >> scroll
> >> the page. If so, use HTML button instead.
> >>
> >> And in page_Init event, add the following code.
> >>
> >> (Let us say name of the HTML Button is btnScroll)
> >>
> >> Protected void Page_Init(object sender, EventArgs e)
> >>
> >> {
> >>
> >> btnScroll.Attributes.Add("Href","xyz.aspx?#f");
> >>
> >> }
> >>
> >> I hope this will help you.
> >>
> >> Regards,
> >>
> >> Pavan
> >>
> >>
> >> "Daniel" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> > Hi All,
> >> > i have problem to scroll the page the the specific section of the page
> >> > after
> >> > click a command button.
> >> >
> >> > I have tried using <a name="f"> and use
> >> > response.redirect("xxxx.aspx?#f").
> >> > Although it works but i dont wan to reload the page.
> >> >
> >> > I also used hyperlink to goto the "f" section. It works good without
> >> > fire
> >> > an
> >> > event (which cause reload page) but, the problem, i wan to click on a
> >> > command
> >> > button and not the hyperlink.
> >> >
> >> > So, how to accomplish it by clicking only the command button and direct
> >> > me
> >> > to the "f" section without fire any event.
> >> >
> >> > Any ideas? guiline?
> >> >
> >> > Thank you in advance.
> >> > Best regards,
> >> > OCurnos
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
S. Justin Gengo
Guest
Posts: n/a
 
      10-03-2005
You're welcome.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Daniel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks Justin.
>
> "S. Justin Gengo" wrote:
>
>> Daniel,
>>
>> If you'd like some already working code I have a "ScrollToElement" method
>> in
>> a Javascript component that I give away free on my website (everything
>> there
>> is free). If you click on the "Code Library" link at the top of
>> www.aboutfortunate.com and then click the "Javascript" button in the menu
>> on
>> the left you can download all source code for the component as a Visual
>> Studio.Net 2003 project. Even if you don't want to use the whole
>> javascript
>> component (it has a lot of other useful scripts in it) you could always
>> strip out the ScrollToElement code. It lets you specify what control on
>> the
>> page to scroll to, or you can give it a page element name as a string in
>> case you want to scroll to something that isn't a .Net control.
>>
>> There is also a help file that explains/gives examples of use of all
>> controls available on my website.
>>
>> --
>> Sincerely,
>>
>> S. Justin Gengo, MCP
>> Web Developer / Programmer
>>
>> www.aboutfortunate.com
>>
>> "Out of chaos comes order."
>> Nietzsche
>> "Daniel" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Hi Pavan,
>> > the code is not working ?? am i miss something??
>> >
>> > thank you
>> >
>> > "Pavan" wrote:
>> >
>> >> Hi,
>> >>
>> >> As far as my understanding, you are using asp.net command button to
>> >> scroll
>> >> the page. If so, use HTML button instead.
>> >>
>> >> And in page_Init event, add the following code.
>> >>
>> >> (Let us say name of the HTML Button is btnScroll)
>> >>
>> >> Protected void Page_Init(object sender, EventArgs e)
>> >>
>> >> {
>> >>
>> >> btnScroll.Attributes.Add("Href","xyz.aspx?#f");
>> >>
>> >> }
>> >>
>> >> I hope this will help you.
>> >>
>> >> Regards,
>> >>
>> >> Pavan
>> >>
>> >>
>> >> "Daniel" <(E-Mail Removed)> wrote in message
>> >> news:(E-Mail Removed)...
>> >> > Hi All,
>> >> > i have problem to scroll the page the the specific section of the
>> >> > page
>> >> > after
>> >> > click a command button.
>> >> >
>> >> > I have tried using <a name="f"> and use
>> >> > response.redirect("xxxx.aspx?#f").
>> >> > Although it works but i dont wan to reload the page.
>> >> >
>> >> > I also used hyperlink to goto the "f" section. It works good without
>> >> > fire
>> >> > an
>> >> > event (which cause reload page) but, the problem, i wan to click on
>> >> > a
>> >> > command
>> >> > button and not the hyperlink.
>> >> >
>> >> > So, how to accomplish it by clicking only the command button and
>> >> > direct
>> >> > me
>> >> > to the "f" section without fire any event.
>> >> >
>> >> > Any ideas? guiline?
>> >> >
>> >> > Thank you in advance.
>> >> > Best regards,
>> >> > OCurnos
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Shipping Auto Shipping Scheduling:car moving auto transport linkswanted ASP .Net 1 11-22-2013 07:02 AM
change the scroll speed of a scroll pane? Kevin Java 1 02-05-2005 09:42 AM
prevent mouse scroll to scroll in a dropdownlist nicholas ASP .Net 0 12-07-2004 11:26 AM



Advertisments