Solved

How to place AccessDataSource Control or SqlDataSource Control where we want them

Posted on 2012-03-12
3
508 Views
Last Modified: 2012-03-13
Hi:

We're writing some vb.net web app with Microsoft Visual Studio 2010, using VB.

When we drag a data source control, e.g. AccessDataSource or SqlDataSource, into a "Design" page of .aspx file, the control always resides next to the left border of the design page and near to the top of the page.

We want to move the control to another pace in the design panel by dragging the smart tag of control to the place where we want. However, it does not work. The control does not move at all.

If you know how to do this, please give us some help.

Really appreciated,

Somits
0
Comment
Question by:somits
  • 2
3 Comments
 
LVL 9

Accepted Solution

by:
lojk earned 500 total points
Comment Utility
I find it easier to use 'Split' view, collapse the section around the datasource and actually drag the (collapsed) code.

I also recommend using a panel (or updatepanel if thats what you need) to group the datasource to its consumer (grid etc) as moving panels around is easier, especially if you have multiple Datasources and Consumers on a page.

Consider using ascx (usercontrols) to group things too - it reduces the total amount of stuff on one (code) file and promotes reusability.

Why does it matter anyway - they are not visible at runtime?
0
 

Author Comment

by:somits
Comment Utility
Hi lojk:

Thanks a lot for your comments that are very helpful.

You're right. These controls are not visible at run time. However, I'd like to find some way to manage these controls - the same default way in .NET 2003 (VS placed all these controls in a panel at the bottom of the design.

Once again, thanks.

Somits
0
 
LVL 9

Expert Comment

by:lojk
Comment Utility
Ah, i understand exactly what you mean.

My comment about using usercontrols does provide a nice simple and agreed best practise way to group the data source with the consuming control and the code that belongs with it but there is no direct equivalent for what you are trying to do (i missed this too when i moved to web development)
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now