Saturday, July 31, 2010
  Search
 
Register
Login
 
More Ways to Install DotNetNuke Modules with the URL Method
While DotNetNuke has a built in mechanism for installing modules, there is another method you can use as well. This is a great alternative to use especially when you are trying to install larger mod...

Find this article and more in the category

Read This Article . . .

Everything You Never Wanted to Know About the Config File
This is the "pre-" first installment in a series that will cover the parts of the web.config file to give you an idea of how to manipulate and customize your DotNetNuke portal. The web.config fi...

Find this article and more in the category

Read This Article . . .

Generate a Module Data Access Layer With CodeSmith
With the introduction of some of the newer DNN tools, building a custom module is becoming more and more easy. With the right tools, you can have a custom module built in no time flat. This will outl...

Find this article and more in the DotNetNuke category

Read This Article . . .

New "Styles" SkinObject Found in DotNetNuke 4.9
One more addition has been added to the developer's DotNetNuke skinning toolbox with the release of DotNetNuke 4.9. Introducing...the Styles SkinObject. This little object is a very welcome addition ...

Find this article and more in the DotNetNuke category

Read This Article . . .

Creating a Virtual Directory in IIS
One of the first things you will need to do prior to installing DotNetNuke on a server is to create a virtual directory which will host your DotNetNuke website.  If you have full control over you...

Find this article and more in the IIS & ASP.NET category

Read This Article . . .

Getting Started with Code Endeavors Ajax Compiled Module Template
DotNetNuke Ajax development just got easy thanks to Jon Henning and his Ajax Compiled Module templates. He’s got them listed on CodePlex, they’re updated for DNN 5, and they are available in C# and V...

Find this article and more in the category

Read This Article . . .

How to Install and Configure ActiveDirectory Provider for DotNetNuke 5.0
 The directions for installing and configuring extensions in DotNetNuke 5.0 are very similiar, but slightly different than from previous versions. Here's how to install the ActiveDirectory authentica...

Find this article and more in the category

Read This Article . . .

Resolving Troubles with DNN User Controls During Module Development & Compilation
So, you've created a module in a separate project using some DNN User Controls and now you're receiving errors and can't compile? If you are using these controls (list below) on your module using ...

Find this article and more in the category

Read This Article . . .

Quick Check for Troubleshooting the CodeEndeavor Ajax Templates
I haven’t just installed the the template and created a module out of the box yet. However, I have come across a few things that I know to check and fix and I’m up and running in no time at all. If y...

Find this article and more in the category

Read This Article . . .

How to Utilize AjaxToolKit with DotNetNuke Portals
Integrating the AjaxToolkit into DotNetNuke modules is super easy. But, can be frustrating if you're not sure how. Find out how to Ajax enable your modules in less than 5 minutes now!   The ...

Find this article and more in the Module Development category

Read This Article . . .

Recently Added Articles

Minimize
Article List

 

How to Use the DNNLabelEdit Control

11/21/2008 12:15:25 AM - By Briana Tarrance

Category: Module Development | | Comments 0

 

 

Related Links

It's easy to use the DNNLabelEdit control, you know the one you mouse over and edit in place? Yeah, that one. In just a few minutes, you can begin using the control on your sites as well for full on the spot editing. Here's how:

 

Register the control

 

<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.UI.WebControls" Assembly="DotNetNuke" %>

 

 Apply Control to the Page

 

  <dnn:DNNLabelEdit ID="lblContent" runat="server" LostFocusSave="False"  ToolBarId="tbEIPHTML" MouseOverCssClass="LabelEditOverClassML"

RenderAsDiv="True" LabelEditCssClass="LabelEditTextClass" EnableViewState="False" Text="Click To Edit" />

 

 *You don't have to use all of the properties, and there are actually many more than what is shown here.

   

Hook Up Your Update Method

   

Select the control and right click or hit F4 to get the properties in Visual Studio. Click on the lightning bolt to get to the methods. Type a name for your new update method and add it to the "UpdateLabel" field. Once you have entered the new name for the method, you will be sent to the code behind and will see the outline of the update method. From here you can add whatever logic you need. Basically, you can access the updated text with "e.Text.ToString" from within the newly create procedure, as seen below

   

Persisting the Update to a Database

   

Protected Sub AddNewCategory(ByVal source As Object, ByVal e As DotNetNuke.UI.WebControls.DNNLabelEditEventArgs) Handles lblContent.UpdateLabel

   

'create the object

Dim catInfo As New CategoriesInfo

   

'get the current user info

Dim user As UserInfo = UserController.GetCurrentUserInfo

   

'fill the object and

'assign the new text to the categoryName value

catInfo.CategoryName = e.Text.ToString

catInfo.CreatedBy = user.DisplayName

catInfo.CreatedOn = Date.Today

   

'update the catInfo object & persist to database

CatController.Create(catInfo)

   

End Sub

   

powered by metaPost

 

 


 
 
Copyright 2008 by Virtual-Essentials.com Privacy Statement    Terms Of Use