473,508 Members | 2,233 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can SetFocus(control)...set a control to the center of the page...

I have SetFocus(GridView1) set to the gridview. However, it just goes
to the left edge of the control instead of making it visible in the
center of the aspx page.
Any help is appreciated.
Thanks,
Trint

Sep 13 '07 #1
4 1694
Hello trint,

What exactly goes to the left edge? The carriage?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
tI have SetFocus(GridView1) set to the gridview. However, it just
tgoes
tto the left edge of the control instead of making it visible in the
tcenter of the aspx page.
tAny help is appreciated.
tThanks,
tTrint
Sep 14 '07 #2
On Sep 13, 10:33 pm, Michael Nemtsev, MVP <nemt...@msn.comwrote:
Hellotrint,

What exactly goes to the left edge? The carriage?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

tI have SetFocus(GridView1) set to the gridview. However, it just
tgoes
tto the left edge of the control instead of making it visible in the
tcenter of the aspx page.
tAny help is appreciated.
tThanks,
t>Trint
I want to center my FormView1 when it becomes "FormView1.visible =
true;"
I have it now going "true", then SetFocus(FormView1); But it just
brings the page
over in the browser to the edge of the formview instead of centering
it in the browser.
Thanks,
Trint

Sep 20 '07 #3
Hello trint,

how are u centrize it right now? setting the align="center" ?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
tI want to center my FormView1 when it becomes "FormView1.visible =
ttrue;"
tI have it now going "true", then SetFocus(FormView1); But it just
tbrings the page
tover in the browser to the edge of the formview instead of centering
tit in the browser.
tThanks,
tTrint
Sep 22 '07 #4
On Sep 22, 5:26 am, Michael Nemtsev, MVP <nemt...@msn.comwrote:
Hellotrint,

how are u centrize it right now? setting the align="center" ?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

tI want to center my FormView1 when it becomes "FormView1.visible =
ttrue;"
tI have it now going "true", then SetFocus(FormView1); But it just
tbrings the page
tover in the browser to the edge of the formview instead of centering
tit in the browser.
tThanks,
t>Trint
It is set to align="center", but I don't set the c# function
"SetFocus(FormView1) until, on the same
aspx file, after user clicks to view the formview FormView1.Visible =
true;
And it ALWAYS sets the focus to the upper left hand corner of the
FormView1, instead of scrolling
Horizontally to the center of the FormView1.
Thanks,
Trint

Sep 22 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2364
by: reidarT | last post by:
How do I set focus on a textbox in a web-form? regards Rehiaa
1
1781
by: reidarT | last post by:
I have a webform and found some code where I understand some of it, but not all The code is as follows public static void SetFocus(Control control) { StringBuilder sb = new StringBuilder(); ...
3
1469
by: Tedmond | last post by:
Hi all, Can anyone tell me how to set focus to particular control on Page_Load() in ASP.Net? I could not find any Control.Focus() method. Thanks for any help! Tedmond
1
5125
by: clickon | last post by:
For testing purposes i have got a 2 step WizardControl. Eqach step contains a text box, TextBox1 and TextBox2 respectively. If i put the following code in the respective activate event handlers for...
6
5714
by: MSDN | last post by:
After a postback, how do I set focus onto a control that is inside an updatepanel?
1
2836
by: Ryan | last post by:
Hello, I am starting the use the new ajax.net and I am seeing a bizarre behavior when controlling focus from the codebehind. I have tried: <control>.focus page.setfocus(<control>)...
4
1600
by: camelean | last post by:
I have a webform that has multiple text boxes and 3 buttons ( Clear, Close, Search). After test is entered in one of the textboxes I want the Search button selected if the user presses enter. ...
1
2659
by: vinothtvt | last post by:
Hi Everybody, I have more textboxes in form.i want when form displayed first textbox is setfocus.but our first textbox is not set that.so pls help me. Thanks, Vinoth
1
7292
by: jvborg | last post by:
I am experiencing a problem when trying to move the setfocus to text field txtSearchDump, if i do not place the text into this field the query which i am initially trying to run does not execute. Any...
0
7383
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5627
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3194
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.