Showing posts with label position. Show all posts
Showing posts with label position. Show all posts

Saturday, March 31, 2012

text box cursor position on entry

Hi I want the cursor to align left when someone clicks in textbox.

textbox has maxlength of 7 when user clicks in text box

the cursor is at position 2 so they cant enter all 7 digits of number

without clicking home and reentering number.

It sounds to me like the textbox has some default text in it already. Otherwise, it would be at the left when they click in. Post your code so we can take a look.
As, suggested please check the Text property. By default when you click inside the TextBox is should align to the left at position "0".

add this in page_load...

sub page_load(byval sender as object, byval e as system.eventargs) handles page.load

txt1.text=""

end sub

cheers

moredotnet


thanks for the replies, I have put txtbox.text="" in page load will see what happens.

please use me.load instead of page.load

cheers

moredotnet


How I CAn Change the Cursor Color or Size InHTML TextBox

Thanks


Hi,

call a java script function onfocus, then set the value of text box to null and then call focus function on that control.

hope this would solve your problem


Unfortunately this not solve my problrm

When textbox.value=null ;

the textbox value be "null"


I wanna to write a dataSet as XML File

I use dataset.WriteXML("Filename"); Method

But if ther are an empty cell it will not Writen

Pls. Help Me;


Hi ,

I couldn't get you complete requirement. Can you try like this.

First check whether your data set contain rows are not . If it contains then write to xml file using

ds.WriteXML("filename.xml")

Thursday, March 22, 2012

Text value of Dropdown.

How do you get the selected text of a dropdown box? Selectedvalue will get
you the value and selectedindex will get you the position, but how do you
get the text (it isn't selectedText).
Thanks,
TomHi tshad,
Try this:
yourDropDownList.SelectecItem.Text
Guillermo G.
----
--
Guillermo Gonzlez Arroyave :: MCP ASP.Net C# :: DCE4
"tshad" <tscheiderich@.ftsolutions.com> wrote in message news:OlXi9QVkFHA.146
4@.TK2MSFTNGP14.phx.gbl...
How do you get the selected text of a dropdown box? Selectedvalue will get
you the value and selectedindex will get you the position, but how do you
get the text (it isn't selectedText).
Thanks,
Tom
d1.SelectedItem.Text;
"tshad" wrote:

> How do you get the selected text of a dropdown box? Selectedvalue will g
et
> you the value and selectedindex will get you the position, but how do you
> get the text (it isn't selectedText).
> Thanks,
> Tom
>
>
Is DropDownList.SelectedItem.Value what you're looking for?
-Brock
DevelopMentor
http://staff.develop.com/ballen

> How do you get the selected text of a dropdown box? Selectedvalue
> will get you the value and selectedindex will get you the position,
> but how do you get the text (it isn't selectedText).
> Thanks,
> Tom
>
> Is DropDownList.SelectedItem.Value what you're looking for?
Oh! Indeed, DropDownList.SelectedItem.Text is what you're after. :S
-Brock
DevelopMentor
http://staff.develop.com/ballen
"HARI PRASD BARU" <HARIPRASDBARU@.discussions.microsoft.com> wrote in message
news:CB37336A-6424-4CF5-A175-C5F90A100150@.microsoft.com...
> d1.SelectedItem.Text;
That was it.
I can never seem to remember that when I need it.
I never understood why you have a SelectedValue, but not a SelectedText.
Thanks,
Tom
> "tshad" wrote:
>

Text value of Dropdown.

How do you get the selected text of a dropdown box? Selectedvalue will get
you the value and selectedindex will get you the position, but how do you
get the text (it isn't selectedText).

Thanks,

TomHi tshad,

Try this:

yourDropDownList.SelectecItem.Text

Guillermo G.

------------------------
Guillermo Gonzlez Arroyave :: MCP ASP.Net C# :: DCE4

"tshad" <tscheiderich@.ftsolutions.com> wrote in message news:OlXi9QVkFHA.1464@.TK2MSFTNGP14.phx.gbl...
How do you get the selected text of a dropdown box? Selectedvalue will get
you the value and selectedindex will get you the position, but how do you
get the text (it isn't selectedText).

Thanks,

Tom
d1.SelectedItem.Text;

"tshad" wrote:

> How do you get the selected text of a dropdown box? Selectedvalue will get
> you the value and selectedindex will get you the position, but how do you
> get the text (it isn't selectedText).
> Thanks,
> Tom
>
Is DropDownList.SelectedItem.Value what you're looking for?

-Brock
DevelopMentor
http://staff.develop.com/ballen

> How do you get the selected text of a dropdown box? Selectedvalue
> will get you the value and selectedindex will get you the position,
> but how do you get the text (it isn't selectedText).
> Thanks,
> Tom
> Is DropDownList.SelectedItem.Value what you're looking for?

Oh! Indeed, DropDownList.SelectedItem.Text is what you're after. :S

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi tshad,

Try this:

yourDropDownList.SelectecItem.Text

Guillermo G.

------------------------
Guillermo Gonzlez Arroyave :: MCP ASP.Net C# :: DCE4

"tshad" <tscheiderich@.ftsolutions.com> wrote in message news:OlXi9QVkFHA.1464@.TK2MSFTNGP14.phx.gbl...
How do you get the selected text of a dropdown box? Selectedvalue will get
you the value and selectedindex will get you the position, but how do you
get the text (it isn't selectedText).

Thanks,

Tom
d1.SelectedItem.Text;

"tshad" wrote:

> How do you get the selected text of a dropdown box? Selectedvalue will get
> you the value and selectedindex will get you the position, but how do you
> get the text (it isn't selectedText).
> Thanks,
> Tom
>
Is DropDownList.SelectedItem.Value what you're looking for?

-Brock
DevelopMentor
http://staff.develop.com/ballen

> How do you get the selected text of a dropdown box? Selectedvalue
> will get you the value and selectedindex will get you the position,
> but how do you get the text (it isn't selectedText).
> Thanks,
> Tom
> Is DropDownList.SelectedItem.Value what you're looking for?

Oh! Indeed, DropDownList.SelectedItem.Text is what you're after. :S

-Brock
DevelopMentor
http://staff.develop.com/ballen
"HARI PRASD BARU" <HARIPRASDBARU@.discussions.microsoft.com> wrote in message
news:CB37336A-6424-4CF5-A175-C5F90A100150@.microsoft.com...
> d1.SelectedItem.Text;

That was it.

I can never seem to remember that when I need it.

I never understood why you have a SelectedValue, but not a SelectedText.

Thanks,

Tom
> "tshad" wrote:
>> How do you get the selected text of a dropdown box? Selectedvalue will
>> get
>> you the value and selectedindex will get you the position, but how do you
>> get the text (it isn't selectedText).
>>
>> Thanks,
>>
>> Tom
>>
>>
>