How can I call web-form method from UserControl?

How can I call web-form method from UserControl, if i don't use code-behind? 

I'am try this:((ASP.view_aspx)this.Page).Voting(); (Where Voting()- the public method of web-form, view_aspx=filename_aspx.) but i catch the error:The type or namespace name 'view_aspx' does not exist in the class or namespace 'ASP' (are you missing an assembly reference?)
If i see Page.ToString() i get "ASP.view_aspx". That very suspicious.
Thanks you for your help.

Pavel Andreevich
3/27/2004 11:42:09 AM 4216 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 27

That object is for compile and execute purposes by ASP.NET itself. Unfortunately, when the page with the above line is compiled, the reference cannot be made. The only way is to have a pre-definition of the user control... and that is where assembled/compiled code behind becomes the hero.

Hope this helps,
-- Justin Lovell
3/27/2004 7:15:52 PM
And what solution do you recommend? Can you write it in details (with example)? (please don't advice me to use code-behid. It's too late)

Thanks yo? for your help!

Pavel Andreevich
3/28/2004 6:54:50 AM
That is what I meant -- the use of code-behind. I told you the reason in the above post. Why is it too late to implement some code behind now?
-- Justin Lovell
3/28/2004 10:09:57 AM

Similar Artilces:

Implementing .Net Form into an web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

Problem to calling a UserControl method into a Web Form page
Hi, I would like to call a method from my ascx.cs page into my web form aspx.cs. I don't inderstand why the compiler doesn't approuve my code. Need some help, please !!! My code into my ascx.cs namespace Projet_Lea.ascx { using System; using System.Data; using System.Drawing; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; /// <summary> /// Description résumée de Ajout1champ. /// </summary> public class Ajout1champ : System.Web.UI.UserControl { ...

how can I call a method in static web service method?
I have a web service method like below that I want to call a edit method in it, hiw can I do that?it cuse error in it.[WebMethod] public static string getText() { } and a method like this?  public void edit() { int a=textbox1.text  } thanx Either you have to declare edit() also as static or create an object of the class and call edit. Hi  sepideh_adi, If you want to use method of webservice, you should reference it firstly. WebSite->Add WebReference->Fill webservice url and webrefernce Name. Then you can use the webservice. webrefernceName tt=new webref...

calling a web form from another web form
I would like to know what is the best way to open a web form from another web form. I would like to call it from a button control. Thanks Well, if I've grasped your question right, there are many methods to do that: 1)Response.Redirect > To navigate to another page from code and is equal to clicking a hyperlink. I suggest this as I think it's closer to your question. 2)Server.Transfer > This ends the current web form and begins a new web form. It's usable when you want to pass some variables i.e (Label1.Text) to the next immediate page. It's not safe though and not used to send p...

How can I open a .Net web applicaiton from a web service page and return values
 Hi allhere is what I need from an Oracle jdeveloper form, click on a button, open a web application in .Net, let the user choose several options and calculate a Total Amount, return the total amount to the jdeveloper application,could it be done with a web service?the Oracle jdeveloper form calls a web service that opens my .Net  web applicationmy web application returns a Total Amount value, my web service returns the Total Amountthe jdeveloper form gets the Total Amountthanksjsn     jsn1:  Hi all here is what I need  from an Oracle jdeve...

I can't open .net web application from VS.NET 2003
I try to open one .net based web application from VS.Net 2003 in my Windows 2K server, get following error message "Visual Studio .NET has detected that the specified Web server is not running ASP.NET version 1.1" and also tried to command line command aspnet_iisreg /i and aspnet_iisreg /r but didn't work. Could somebody give me some idea to solve this issue? Thanks a lot! Check if iis is installed and running if yes then uninstall .Net Frame work and install it again. I got same error few months ago and solved it by using above option. Arvind Malik First, I would see...

For interrupting.web form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form
Web Form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form ! Because of my pool English, if you can't see , I will explain more ! ThanksGambler is the real life I guess you mean when form grows it also grow parent div element. This is normal. If you want div to stay fixed size and rather clip the form and maybe show a scrollbar, look at overflow property in CSS.Thanks------------------------------------------------------------This posting is provided "AS IS" with no warranties, and confers no ...

Can a .NET web based intranet application call a windows based .NET application?
   Is it possibly to have an 2.0 application call/invoke a windows desktop application written in .NET 2.0? We have a .NET 1.0 windows desktop application that was written in C#. We also have a new .NET intranet web application written in 2.0. Is it possibly to have a button on the web application that when pressed will invoke the .NET 1.0 windows application? And then if someone closes the application, it will return control back to the ASP.NET 2.0 application?    Are you referring to running a WinForms application on the server or on the client PC? ...

How can I pass additional parameters to the web service or how can I call a method in the code behind page.
I have done a ton of research in this area and there just does not seem to be a way to pass any addiional parameters to the Web Service reference in the autoextneder call.  Is there a way that this can be done.  In my world, the list of suggestion is dependant on other data on my web form or web user control.   I had read some references that you might be able to call a method in the code behind page, however everything i have tried on this has failed.  Here is a list of what I have attempted  Tried to add query string arguments to the service path property (er...

can someone one give me difference between web form and mobile web form and which or where or when i'm using the forms?
thanks Marc Hi Marc, Based on my understanding, you want to know the differences between the ASP.NET web application and ASP.NET mobile web application. If I have misunderstood you, please feel free to let me know. The ASP.NET forms are used to develop the ASP.NET pages for desktop browsers and The ASP.NET mobile forms are used to develop the ASP.NET pages for mobile device browsers. When we create the ASP.NET mobile web forms pages, we can use nearly all the features of ASP.NET. But there are a couple of compatibility issues: Error Handling and Reporting. Tracing. Using Redi...

Exception while calling .NET web service | System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Hi,   We have written a .NET web service which retrieves an xml file from the database. This web service is SSL secured and requires client certificates for connection.   Problem: The web service is throwing an exception while retrieving large files. It works fine when the file size is around 1 MB, but fails with a file size of around 65 MB with the following exception: System.InvalidOperationException: There is an error in XML document (1, 38455668). ---> System.IO.IOException: Unable to read data from the transport connection. ---> System.Net.Sockets.SocketException: ...

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

Can my web page with a form submit to other web pages forms?
I was wondering if I created an aspx page that had a form on it that I could use the submit button to submit this form's contents to other web pages forms(servers accepting those form's data). I am thinking this would be a great way to update data on particular web pages without having to actually visit those similar web pages. Any ideas, examples would be much appreciated. Thanks in advance.  Yes you can.  It's called Cross Page Posting: might ...

Web resources about - How can I call web-form method from UserControl? -

'url' Top Users - Stack Overflow
current community chat blog Stack Overflow Meta Stack Overflow Stack Overflow Careers your communities Sign up or log in to customize your list. ...

List of content management frameworks - Wikipedia, the free encyclopedia
.NET Framework , works with SQL Server, VistaDB , with XSLT or .NET UserControls Text is available under the Creative Commons Attribution-ShareAlike ...

OPAC Discovery
Switch Language To switch to a different language, select from the following list: English French Spanish Italian British Bulgarian Galician ...

The royal baby - Australian Women's Weekly
MAKE AWW MY HOMEPAGE SUBSCRIBE AND SAVE TODAY FOOD RECIPES ROYALS CELEBS Home Food Recipe search Recipe collections Meal maker Expert Q & A Cookbooks ...

Envoyer par courriel à un ami - Best Buy Canada
Envoyer par courriel à un ami à Best Buy Canada

Bytes - IT + Developer Community - Connect with IT Pros is a community for Developers and IT Professionals. Join 414,150 members and discuss topics such as software development, networking, ...

Canonical Splines in WPF and Silverlight
January 22, 2009 New York, N.Y. Windows Forms has two methods named DrawCurve and DrawClosedCurve that draw canonical (aka cardinal) splines. ...

Silverlight Toolkit - Issues
Silverlight Toolkit and Silverlight for Windows Phone Toolkit are a set of Microsoft components for developers.

Keep, share, and discover the best of the Web using Delicious, the world's leading social bookmarking service.

DotNetNuke Modules – Anatomy of the View
-*+Now that we’ve laid the foundation of DotNetNuke modules, it is time to start looking at the specific modules. While it would be practically ...

Resources last updated: 12/31/2015 10:06:21 AM