473,420 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,420 software developers and data experts.

User Control's/serverside-forms/IsPostBack/Viewstate?

Hi!

I can't show a ascx-control in a correct manner when the ascx-control uses
another ascx-control, the IsPostBack and ViewState's etc. don't seems to
work, problably because there can only be one form that runs at server per
page.

When I have this first control as an aspx-page instead, the DropDownLists in
the ascx-control I use in the aspx-page are filled with correct data and
everything works just fine, but as I tried to explain, nothing works when
converting this aspx-page that uses a ascx-control, to be an ascx-control
itself.

How do you other fellas solve the issue of multiple serverside-forms/page,
and the possibilities of using ascx-controls that's using ascx-controls
etc.?

If anybody have a solution of this problem, I would appreciate it...

Thanx for taking the time to read about this...
Nov 19 '05 #1
3 1561
dont rename an ASPX to ASCX and expect it to work as a control.
In visual studio (which I'm assuming you are using) select control as the
item you want to add, it will be properly setup then.
Controls dont get a <form> tag, they aren't meant to be used "stand-alone"
so they dont need it.

--
Curt Christianson
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"MattGood" <jo************@bredband.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi!

I can't show a ascx-control in a correct manner when the ascx-control uses
another ascx-control, the IsPostBack and ViewState's etc. don't seems to
work, problably because there can only be one form that runs at server per
page.

When I have this first control as an aspx-page instead, the DropDownLists
in the ascx-control I use in the aspx-page are filled with correct data
and everything works just fine, but as I tried to explain, nothing works
when converting this aspx-page that uses a ascx-control, to be an
ascx-control itself.

How do you other fellas solve the issue of multiple serverside-forms/page,
and the possibilities of using ascx-controls that's using ascx-controls
etc.?

If anybody have a solution of this problem, I would appreciate it...

Thanx for taking the time to read about this...

Nov 19 '05 #2
Thanx Curt!

But that don't seem to be the problem...
I don't just rename the ASPX, and I have "Control Language="c#"
AutoEventWireup="false" Codebehind="" etc. in the ASCX, I set it up that way
you described, so that's not the problem, and I don't have form-tags,
starting directly with a table-tag, and I register a tagprefix and tagname
and src so I can use the other ascx-file in this one with these tags...

Actually, both the ASCX-control and the ASCX-control that is in the other is
shown, but the data is not filled, seems to be IsPostBack and ViewStates
that doesn't work...

MattGood
"Curt_C [MVP]" <software_AT_darkfalz.com> skrev i meddelandet
news:%2****************@tk2msftngp13.phx.gbl...
dont rename an ASPX to ASCX and expect it to work as a control.
In visual studio (which I'm assuming you are using) select control as the
item you want to add, it will be properly setup then.
Controls dont get a <form> tag, they aren't meant to be used "stand-alone"
so they dont need it.

--
Curt Christianson
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"MattGood" <jo************@bredband.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi!

I can't show a ascx-control in a correct manner when the ascx-control
uses another ascx-control, the IsPostBack and ViewState's etc. don't
seems to work, problably because there can only be one form that runs at
server per page.

When I have this first control as an aspx-page instead, the DropDownLists
in the ascx-control I use in the aspx-page are filled with correct data
and everything works just fine, but as I tried to explain, nothing works
when converting this aspx-page that uses a ascx-control, to be an
ascx-control itself.

How do you other fellas solve the issue of multiple
serverside-forms/page, and the possibilities of using ascx-controls
that's using ascx-controls etc.?

If anybody have a solution of this problem, I would appreciate it...

Thanx for taking the time to read about this...


Nov 19 '05 #3
But I really can't find out how to solve the problem, I was forced to have
an IFRAME in my default page, where my layout is, and put ASPX-pages in
that, to make the things work... I just want to add controls to a TD-tag or
DIV-tag or something like that, so the size of the page/control doesnt
matter in the same way it does when using a IFRAME. The IFRAME is not the
solution for me, I think... I can easily add controls to a TD-tag or
DIV-tag. But thats when the problems occurs, on postback, the whole page
reloads, and the control is vanished or has to be reloaded in page_load, and
then the states before postback is gone, of course... But, is there
something that I may have foreseen that may cause my troubles? And is there
any solution of this?

MattGood

Thanx Curt!

But that don't seem to be the problem...
I don't just rename the ASPX, and I have "Control Language="c#"
AutoEventWireup="false" Codebehind="" etc. in the ASCX, I set it up that
way you described, so that's not the problem, and I don't have form-tags,
starting directly with a table-tag, and I register a tagprefix and tagname
and src so I can use the other ascx-file in this one with these tags...

Actually, both the ASCX-control and the ASCX-control that is in the other
is shown, but the data is not filled, seems to be IsPostBack and
ViewStates that doesn't work...

MattGood


dont rename an ASPX to ASCX and expect it to work as a control.
In visual studio (which I'm assuming you are using) select control as the
item you want to add, it will be properly setup then.
Controls dont get a <form> tag, they aren't meant to be used
"stand-alone" so they dont need it.

--
Curt Christianson
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com

Hi!

I can't show a ascx-control in a correct manner when the ascx-control
uses another ascx-control, the IsPostBack and ViewState's etc. don't
seems to work, problably because there can only be one form that runs at
server per page.

When I have this first control as an aspx-page instead, the
DropDownLists in the ascx-control I use in the aspx-page are filled with
correct data and everything works just fine, but as I tried to explain,
nothing works when converting this aspx-page that uses a ascx-control,
to be an ascx-control itself.

How do you other fellas solve the issue of multiple
serverside-forms/page, and the possibilities of using ascx-controls
that's using ascx-controls etc.?

If anybody have a solution of this problem, I would appreciate it...

Thanx for taking the time to read about this...



Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Roz Lee | last post by:
I have a page with two textboxes and two buttons which post back to the server. I want to detect which button has been clicked for testing purposes preferably clientside, but otherwise serverside....
3
by: Dennis M | last post by:
Hey everyone, I am curious what the performance impact of a custom control would be if it had a significant hierarchy of children. For example, 40 child controls, 5 levels deep, each control on...
3
by: Pradeep Kumar C | last post by:
Hi , I am working on a ASP.Net Web Application which need some requirement as given below. Let's say two user's A and B. When a User A Assign a task to B , Then B need to get some sort of...
2
by: Green | last post by:
Hi, I have an user control on one page, how can i get the id of the user control? Any idea? Thanks ahead.
1
by: Manny Chohan | last post by:
Hi Guys, I am newbie using C#. I have a header control with drop down application list. i need to hide panels in the navigation user control which presents users with different menus based on...
7
by: Hani Atassi | last post by:
I developed a client side control using Windows Forms and I want to deploy it through IE inside an ASP.NET project. I am using the object tag to deploy: <OBJECT id="SSFileCtrl1"...
1
by: news.microsoft.com | last post by:
If I have an ASP.net button inside a template for a custom control and use the code below, everything works fine and it generates the correct id and the asp.net button calls serverside click event...
3
by: DEWright_CA | last post by:
I have 2 controls on a page that need to be defined by absolute horiz. and vert. sizes, and both need to be a percentage of the screen size. Does anyone know of a easy way to grab the screen...
1
by: fomalhaut | last post by:
Hi All, I'm builing an application that requires domain admin access to run, and I'm trying to allow for the application to be run as a normal user and allow the user to provide it with a...
7
by: L. Ximenes | last post by:
Hello everyone, I know how to parse data from an XML file with Javascript; but what if I would like to parse data from a user-submitted XML file via the " <input type='file'"? Would it be...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.