Click here to Skip to main content
15,917,059 members
Home / Discussions / Web Development
   

Web Development

 
Generalshifting items in b/w list boxes Pin
azam31630-May-05 5:23
azam31630-May-05 5:23 
GeneralRe: shifting items in b/w list boxes Pin
JKroschel30-May-05 13:26
JKroschel30-May-05 13:26 
GeneralWrite a special program(xxx) :D Pin
rockxuyenmandem29-May-05 23:44
rockxuyenmandem29-May-05 23:44 
GeneralRe: Write a special program(xxx) :D Pin
JKroschel30-May-05 13:35
JKroschel30-May-05 13:35 
GeneralUsing session states?? :(( Pin
Member 191349829-May-05 23:15
Member 191349829-May-05 23:15 
GeneralRe: Using session states?? :(( Pin
Christian Graus30-May-05 12:19
protectorChristian Graus30-May-05 12:19 
GeneralRe: Using session states?? :(( Pin
31-May-05 2:04
suss31-May-05 2:04 
GeneralRe: Using session states?? :(( Pin
Christian Graus31-May-05 11:09
protectorChristian Graus31-May-05 11:09 
shazza2ee wrote:
I have a page with both on it plus then I split them up onto 2 pages but how do I make them page controls?

Simple - take the HTML and put it in a new ascx, by right clicking on a folder in your project and choosing 'add'->'new web user control'. Then put all your codebehind into the codebehind for the control. Finally, put a block like this at the top of your page:

<%@ Register tagprefix="myTag" Tagname="ControlName" Src="/PathToControl.ascx" %>

Then in your page you can put
<myTag:ControlName id="thename" runat="server" otherproperty="blah"/>

Now you can create an instance of hte control called thename in the codebehind and treat it like any other control. Any properties you define on the control can be set in the aspx as well as the codebehind.

shazza2ee wrote:
do I have to use panels??

No. What happens is that your two controls end up being all that's on the page, you just show one or the other. You can put stuff common to both pages into a seperate control and show it all the time if you want, or add normal HTML, but you don't have to.


shazza2ee wrote:
but when I show one it is shown in the position it is on the page, how can I place it at the top of the page to make it look like a new page?

It will show up where-ever you put the control. In this case, the control IS the entire page, so that's not a problem.

shazza2ee wrote:
I don't really understand what you mean, could you maybe give a simple example?? I am trying a million different things and now I am totally confused

Sorry if I've confused you. Here's an MSDN link ( with more links on the bottom ) on web user controls.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskcreatingwebusercontrols.asp

There are bound to be lots of examples on this site also. Just ask if you're still stuck.

Christian Graus - Microsoft MVP - C++
GeneralWeb Service Exceptions at run time Pin
skrishnasarma29-May-05 22:39
skrishnasarma29-May-05 22:39 
GeneralRe: Web Service Exceptions at run time Pin
minhpc_bk30-May-05 18:23
minhpc_bk30-May-05 18:23 
GeneralHTML - DREAMWEAVER Pin
anonyy29-May-05 2:59
anonyy29-May-05 2:59 
Generalblinking cursor in a textbox control on webform Pin
blackbox32027-May-05 21:01
blackbox32027-May-05 21:01 
GeneralRe: blinking cursor in a textbox control on webform Pin
NeverHeardOfMe28-May-05 1:46
NeverHeardOfMe28-May-05 1:46 
GeneralRe: blinking cursor in a textbox control on webform Pin
NeverHeardOfMe28-May-05 8:55
NeverHeardOfMe28-May-05 8:55 
Generalretrieving currently logged on user with php Pin
sola oderinde27-May-05 20:34
sola oderinde27-May-05 20:34 
GeneralRe: retrieving currently logged on user with php Pin
alex.barylski29-May-05 12:55
alex.barylski29-May-05 12:55 
Generalunicode web page Pin
jbello26-May-05 7:22
jbello26-May-05 7:22 
GeneralRe: unicode web page OOps! Pin
jbello27-May-05 8:24
jbello27-May-05 8:24 
Questionhow to print webpage content? Pin
Mahantesh_Hongal26-May-05 2:18
Mahantesh_Hongal26-May-05 2:18 
AnswerRe: how to print webpage content? Pin
enjoycrack29-May-05 15:48
enjoycrack29-May-05 15:48 
Questionmple Sessions? Pin
25-May-05 10:10
suss25-May-05 10:10 
AnswerRe: mple Sessions? Pin
Anonymous27-May-05 17:01
Anonymous27-May-05 17:01 
QuestionHow to authencating user against Active directory through LDAP Pin
Nitinkg24-May-05 19:49
Nitinkg24-May-05 19:49 
AnswerRe: How to authencating user against Active directory through LDAP Pin
Colin Angus Mackay24-May-05 22:29
Colin Angus Mackay24-May-05 22:29 
GeneralRe: How to authencating user against Active directory through LDAP Pin
Nitinkg24-May-05 23:02
Nitinkg24-May-05 23:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.