(newbie) Help with a moderately complex control

G

Guest

Hi folks,

I'm using Visual Web Dev. Expr., ASP.NET 2.0 and C#., all of which are new
to me so please forgive uninformed questions.

I have read Dino Esposito's article on Control Development and studied the
sample code, and have also installed and studied some of Steve Orr's
controls, which has helped a bit.

I'm trying to develop a control that displays a listbox with a vertical
slider that contains a list of formatted hyperlinks that display as Lastname,
Firstname selected from a customer database. At the top I need an array of
"first letters" that are also links to begin the selection, so that the list
can show names that start with "A" or "B", etc. At the bottom I would like
forward/backward arrows to page the list forward or backward from its current
point.

I suspect most of this can be done by simply referencing existing classes,
but I don't yet have the knowledge of all of them I need. Specifically, in a
databound control how do I access the selected columns from each row to
format the string for the hyperlink? Without using cursors (a performance
no-no), how do I construct the page-forward, page-backward links? Is this a
good use of Postback?

As an editorial comment, ASP.NET and C# seem much more difficult to learn
from scratch than most of what I have done in the past (going back to 1968).
Everything is very fragmented, and everything is dependent on something else.
It seems like if you don't know every single class, method and property in
the library you can't do anything. Perhap's that's just an old man's griping
about the steep learning curve :).

Any guidance will be most appreciated.
 
C

Cowboy \(Gregory A. Beamer\)

Mike:

I Feel your pain. Actually ASP.NET and the .NET Framework are quite easy to
learn, esp. with the plethora of information. The biggest hurdle is the
paradigm shift from functional programming to OOP. While you can write
functional code in .NET, it is hard and kludgy.

With the control development, you can certainly inherit from a control, but
your needs are very unique (need a "hidden div" to show up when the user
clicks or scrolls down, etc. While there are controls for all of what you
are doing, stitching controls together is problematic, so you might end up
writing one from scratch. A pain? Certainly, but once you have it working,
you can reuse it for all of your projects. :)

As for storing cursor on paging. If you go the DataSet route, the plumbing
is already finished for you. If you are talking hundreds of thousands of
rows, it is not a good solution, however. In that case, keeping the first
and last key id (primary key in database) is the easiest way to implement a
custom cursor. Forward = next X records above ID # X and back is opposite.

Hope all this makes sense.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top