ASCX user control help!!
-
Please could someone help me I want to create a popup window. Now i've created the window in a ascx file. Now what i would like to do is make the control work like other asp controls for e.g.
......
what i would like to to is add whatever into the content space. I dont realy know alot about creating my own controls but is this posible??
-
Please could someone help me I want to create a popup window. Now i've created the window in a ascx file. Now what i would like to do is make the control work like other asp controls for e.g.
......
what i would like to to is add whatever into the content space. I dont realy know alot about creating my own controls but is this posible??
Yes, u can create ur own user control and use that in ur aspx page like other asp controls. But u have to register ur control (either in each page or in web config). u can use <%@ Register TagName="tagname" TagPrefix="tagprefix" Src="~/usercntrl.ascx" %> in top of the aspx page and use ur user control Hope it helps u :)
-
Yes, u can create ur own user control and use that in ur aspx page like other asp controls. But u have to register ur control (either in each page or in web config). u can use <%@ Register TagName="tagname" TagPrefix="tagprefix" Src="~/usercntrl.ascx" %> in top of the aspx page and use ur user control Hope it helps u :)
Thanks for the reply I know how to create and use the ascx controls but i want to add extra functionality to it let me try and explain it in another way. I want to make like for e.g. the asp panel it would be used like this
now what i want to do is like the same way you use the panel to place something inside , i want to use my custom control just again , its a popup window and i would like to use some sort of place holder where i can place stuff in for e.g. i would want to use the window for error messges or to put in a few textboxes and labels. like this
-
Thanks for the reply I know how to create and use the ascx controls but i want to add extra functionality to it let me try and explain it in another way. I want to make like for e.g. the asp panel it would be used like this
now what i want to do is like the same way you use the panel to place something inside , i want to use my custom control just again , its a popup window and i would like to use some sort of place holder where i can place stuff in for e.g. i would want to use the window for error messges or to put in a few textboxes and labels. like this
If it's a popup, it's a seperate window, not a control.
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
-
If it's a popup, it's a seperate window, not a control.
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
sory about the way my posts are looking , they dont display right on my side, anyways , i know its a different window , i want to use it with the ajaxmodalpopup extender , the way i want to create the control must be like a template of some sorts , I'm putting in a label header which can be changed with the control's properties and then in the middle i want a place holder where i can place buttons or tables and stuff, like this <tst:mycontrol runat ="server" id = "tst1" HeaderText = "Error"> <content> ....... (maybe table with message in and a button to click ok) </content> </tst:mycontrol>$