Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Maximum ASP
  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
Verndale
The Official Microsoft ASP.NET Website
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Inline Function calls in a WAP project
Previous Previous
 
Next Next
New Post 8/27/2008 1:56 PM
User is offline tsensenbach
20 posts
www.quantumclub.com
10th Ranked


Inline Function calls in a WAP project 

Hello DNN Community!

 

I have been trying to convert a module that Michael Washington Created that used to be part of a website project to a WAP project by itself and am having some difficulty that I hope you can help me with.

 

The Survey.ASCX file contains calls to functions that are located in the code behind file like this:

 

Text='<%# formatQuestion(DataBinder.Eval(Container.DataItem,"Question"),lstResults.Items.Count + 1) %>'>

 

NavigateUrl='<%# EditURL("SurveyId",DataBinder.Eval(Container.DataItem,"SurveyId")) %>'

 

This project compiles fine, but when I add my module to a page in my site I get this type of error:

error BC30451: Name 'formatQuestion' is not declared.

 

My question is: can I still call server side functions like this in a WAP? If so, how do I change the syntax to all this? If not, how would you recommend I best bind these controls?

 

Thanks in advance for your help!

 

Thanks Todd.

 

 
New Post 8/27/2008 3:36 PM
User is offline Brian Dukes
476 posts
www.engagesoftware.com
8th Ranked


Re: Inline Function calls in a WAP project 

There shouldn't be any problem calling code in that mannor from a WAP.  If it's not finding the right functions, I would try looking to make sure that the Inherits attribute of the control is set to the right code-behind class.

Hope it helps,


Brian Dukes
Engage Software
St. Louis, MO
314.966.4000

The leading provider of DotNetNuke support, training and custom module development.
 
New Post 8/27/2008 4:08 PM
User is offline AliCommerce
198 posts
www.AliCommerce.com
9th Ranked


Re: Inline Function calls in a WAP project 
Modified By AliCommerce  on 8/27/2008 6:09:24 PM)

Make formatQuestion protected or public, then it should be accessible in your ascx control.


Frank Wang
AliCommerce
The best DNN shopping cart module. 100% satisfaction is guaranteed.
 
New Post 8/28/2008 9:03 AM
User is offline tsensenbach
20 posts
www.quantumclub.com
10th Ranked


Re: Inline Function calls in a WAP project 

Hi Brian and Frank,

 

Thanks for the reply. I have gotten around the first problem with formatQuestion, once I declared the function public. Now I am getting this error when I add my module to a page:

 

error BC30451: Name 'IsEditable' is not declared

 

Here is the offending code in the HTML:

 

<asp:HyperLink ID="cmdEdit2" ImageUrl="~/images/edit.gif" NavigateUrl='<%# EditURL("SurveyId",DataBinder.Eval(Container.DataItem,"SurveyId")) %>'
                            Visible="<%# IsEditable %>" runat="server" />
 

Any idea why this is happenning?

 

Thanks Todd.

 
New Post 8/29/2008 9:13 AM
User is offline Brian Dukes
476 posts
www.engagesoftware.com
8th Ranked


Re: Inline Function calls in a WAP project 

Does that code work from your code-behind?  It seems like there's probably a disconnect between your .ascx and the code-behind.

In the code-behind, it will look like Me.cmdEdit2.Visible = IsEditable

Hope that helps,


Brian Dukes
Engage Software
St. Louis, MO
314.966.4000

The leading provider of DotNetNuke support, training and custom module development.
 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Inline Function calls in a WAP project
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DotNetNuke® in Sweden
All service of DotNetNuke® in Sweden.
Olsmar Konsult
DocuPeak Business Process Management RAD
Comprehensive enterprise and government process management. Forms, documents, indexing, workflow, views, content intelligence, capture, etc. Point and click rapid application development.
www.Webiplex.com
ADefWebserver.com
DotNetNuke® Module Development Help Website
ADefWebserver.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP