How to Auto resize combo in ASP
am 12.12.2006 13:22:00 von AbdhulSaleemHi,
Is there any way to auto resize the dropdown list part of a combo(
Hi,
Is there any way to auto resize the dropdown list part of a combo(
=?Utf-8?B?QWJkaHVsIFNhbGVlbQ==?= wrote on 12 dec 2006 in
microsoft.public.inetserver.asp.general:
> Is there any way to auto resize the dropdown list part of a
> combo(
> full text.
>
> By default the combo width is increased according to the long text
> dropdown list item. But I dont want that much width of the combo. So I
> am using fixed width for
>
> In Visual Basic it is possible using APIs. But can i use the same APIs
> in ASP? If so any help link or code snippet will help me.
Classic ASP is serverside executed code,
so it cannot autosize anything in a browser.
Something like size = <% = calculatedsize %> micht be done.
However as you use the word, 'combo',
it seems you are referring to asp.net.
This NG is a classic asp group.
Dotnet questions should be asked in
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Evertjan,
I am using ASP only and not ASP.NET. I am referring
I saw a code snippet in the following URL to achieve this in Visual Basic
http://vbnet.mvps.org/index.html?code/comboapi/combowidthadv .htm
Is there any way to use the code snippet in ASP? Because some APIs are used.
I don't have idea of working with APIs in ASP. Please provide me some help
links on working with APIs using ASP.
Regards,
M. Abdhul Saleem.
"Evertjan." wrote:
> =?Utf-8?B?QWJkaHVsIFNhbGVlbQ==?= wrote on 12 dec 2006 in
> microsoft.public.inetserver.asp.general:
> > Is there any way to auto resize the dropdown list part of a
> > combo(
> > full text.
> >
> > By default the combo width is increased according to the long text
> > dropdown list item. But I dont want that much width of the combo. So I
> > am using fixed width for
> >
> > In Visual Basic it is possible using APIs. But can i use the same APIs
> > in ASP? If so any help link or code snippet will help me.
>
> Classic ASP is serverside executed code,
> so it cannot autosize anything in a browser.
>
> Something like size = <% = calculatedsize %> micht be done.
>
> However as you use the word, 'combo',
> it seems you are referring to asp.net.
>
> This NG is a classic asp group.
>
> Dotnet questions should be asked in
>
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
>
=?Utf-8?B?QWJkaHVsIFNhbGVlbQ==?= wrote on 12 dec 2006 in
microsoft.public.inetserver.asp.general:
> "Evertjan." wrote:
>
>> =?Utf-8?B?QWJkaHVsIFNhbGVlbQ==?= wrote on 12 dec 2006 in
>> microsoft.public.inetserver.asp.general:
>> > Is there any way to auto resize the dropdown list part of a
>> > combo(
>> > with full text.
>> >
>> > By default the combo width is increased according to the long text
>> > dropdown list item. But I dont want that much width of the combo.
>> > So I am using fixed width for
>> >
>> > In Visual Basic it is possible using APIs. But can i use the same
>> > APIs in ASP? If so any help link or code snippet will help me.
>>
>> Classic ASP is serverside executed code,
>> so it cannot autosize anything in a browser.
>>
>> Something like size = <% = calculatedsize %> micht be done.
>>
>> However as you use the word, 'combo',
>> it seems you are referring to asp.net.
>>
>> This NG is a classic asp group.
>>
>> Dotnet questions should be asked in
>>
>>
[Please do not toppost on usenet]
> I am using ASP only and not ASP.NET. I am referring
>
> I saw a code snippet in the following URL to achieve this in Visual
> Basic http://vbnet.mvps.org/index.html?code/comboapi/combowidthadv .htm
>
> Is there any way to use the code snippet in ASP? Because some APIs are
> used. I don't have idea of working with APIs in ASP. Please provide me
> some help links on working with APIs using ASP.
Again, ASP is executed serverside and only produces HTML as a stream to
the client. VB is executed on the machine itself, but is not a browser
thing.
So an API on serverside would not do any good to the html that is
received clientside.
Please think again about the difference between serverside and clientside
code execution.
So, if you can calculate on the server what size (width, height,
character number, etc) you need on the client,
you can transfer it like I showed above and show here:
<%
calculatedWidth = numberofCharacters * 7
%>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
"Abdhul Saleem"
news:691AA118-FBA3-4346-8A41-ADECCA1B4CEF@microsoft.com...
> Evertjan,
>
> I am using ASP only and not ASP.NET. I am referring
>
> I saw a code snippet in the following URL to achieve this in Visual Basic
> http://vbnet.mvps.org/index.html?code/comboapi/combowidthadv .htm
>
> Is there any way to use the code snippet in ASP? Because some APIs are
used.
> I don't have idea of working with APIs in ASP. Please provide me some help
> links on working with APIs using ASP.
Unless you install an ActiveX component on the client you cannot access APIs
to help you with this.
Your only option is to emulate the combo with a text, button and an
absolutely positioned DIV along with a non-trivial chunk Javascript. You
might find a free library of JS code that can do that.
Best choice would be to design the requirement out of you system.