473,757 Members | 5,404 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

I have SetFocus(GridVi ew1) 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 1712
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(GridVi ew1) 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.co mwrote:
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(GridVi ew1) 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.visi ble =
true;"
I have it now going "true", then SetFocus(FormVi ew1); 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.visi ble =
ttrue;"
tI have it now going "true", then SetFocus(FormVi ew1); 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.co mwrote:
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.visi ble =
ttrue;"
tI have it now going "true", then SetFocus(FormVi ew1); 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(FormV iew1) until, on the same
aspx file, after user clicks to view the formview FormView1.Visib le =
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
2381
by: reidarT | last post by:
How do I set focus on a textbox in a web-form? regards Rehiaa
1
1790
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(); sb.Append("\r\n<script language='JavaScript'>\r\n"); sb.Append("<!--\r\n"); sb.Append("function SetFocus()\r\n");
3
1484
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
5136
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 the two steps, TextBox1.Text ="foo"; and TextBox2.Text = "bar";
6
5724
by: MSDN | last post by:
After a postback, how do I set focus onto a control that is inside an updatepanel?
1
2846
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>) CType(Master.FindControl("<form id>"), HtmlForm).DefaultFocus =
4
1613
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. Currently the clear button is engaged upon enter. I have entered the following code in the textchanged event. Protected Sub txtERname_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtERname.TextChanged
1
2679
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
7308
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 advice would be very helpful Thanks Joe Select Case Me.optSearchCriteria.Value Case 1 strSQL = strSelect & strFrom & strTitle Case 2 strSQL = strSelect & strFrom & strDescription
0
9487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10069
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9884
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7285
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6556
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5168
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2697
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.