Custom Form w/Inline Code and Databind controls

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
7/7/2011 8:12:43 PM
Gravatar
Total Posts 10

Custom Form w/Inline Code and Databind controls

I need to create a custom page that has some basic controls (dropdownlist box, text box).  The page will also have a submit button on it.  I believe this has to be in a <form>.  The dropdownlist box items need to get populated on page load from a ms sql data source.

Can something like this be accomplished with mojoPortal?  If so, are there some examples?  I found some examples of inline coding, but it did not contain a <form>.  I tried adding a <form> from within an ascx page and the page did not display the desired results.

Do I also have to include:

<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.sqlClient" %>

To make the databinding work?  I tried and the same thing, undesirable results.

 

Suggestions?

7/8/2011 9:48:52 AM
Gravatar
Total Posts 18439

Re: Custom Form w/Inline Code and Databind controls

You don't need to add any form inside a .ascx file, in ASP.NET WebForms there can be one and only one form on a page and it already exists in the layout.master file so you don't need to add one and adding one would break things.

If you need to import a namespace keep in mind it it case sensitive.

I recommend study the developer docs and training videos and especially the hello world article should help as far as how to wire up a button and its click event. 

Hope that helps,

Joe

7/10/2011 11:05:46 PM
Gravatar
Total Posts 10

Re: Custom Form w/Inline Code and Databind controls

Thanks Joe.  So having multiple controls (text box, dropdownlist box, etc) on the same page and populating the dropdownlist box from a ms sql query should be doable correct?

You must sign in to post in the forums. This thread is closed to new posts.