CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.web_parts_and_personalization Tags:
Item Type: Date Entered: 12/11/2007 9:25:22 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 7 Views: 253 Favorited: 0 Favorite
8 Items, 1 Pages 1 |< << Go >> >|
"ketaki_pore" <
NewsGroup User
Convert a user control, so that it can be used as a web part.12/11/2007 9:25:22 AM

0

Hello All,

I need some help in implementing the web part.

I want to convert my existing user control to a web part. And this web part i would use it in my ASP.Net 2.0 Web Application and not in sharepoint portal.

So the first thing that i could implement is:

Using the ascx control in web part zone. Also this user control implements the IWebPart Interface. This is what we call a Generic Web part.

But now i would like to know is this good way to do?

What if i implement custom web part, that is writing a class that would Inherit WebPart. But i am not clear how to do this. As i have never given a try to building custom controls, so i am not sure how would i generate the UI for this?

So if i do need to write custom web part, i would like to get hand on good articles so that i can study and implement.

Also i am not understanding why to use webpart ?  Because whats the use if it allows the user to just minimize and close the controls. 

Please let me know so what is a better way to convert a user control to a web part.

Thanks,

Ketaki

 

 

 

 

"XIII" <>
NewsGroup User
Re: Convert a user control, so that it can be used as a web part.12/11/2007 11:44:01 AM

0

Hi,

maybe this one can help you out: son of smartpart.

Grz, Kris. 


Kris van der Mast [MVP] || 101 LINQ to SQL samples
"Deleo" <>
NewsGroup User
Re: Convert a user control, so that it can be used as a web part.12/11/2007 2:05:36 PM

0

if i am not mistaken, the webpart zone automaticly wrap every user control inside to a webpart. All you have to do, is to place your usercontrol inside a webpartzone and it is a webpart.

You only need to implement webpart interfaces to use the extra features or implementing own logic in the webpart process. :)

 

"vinz" <>
NewsGroup User
Re: Convert a user control, so that it can be used as a web part.12/12/2007 7:35:17 AM

0

 You just need to drag your User controls inside the WebPartZone and it will be automatically be converted as a webpart


Always remember to click ?Mark as Answer? if my replies helped you!

Learn through experience and grow from it...

vinz
SDE - .NET/ASPNET/C#
Koffeekoder Articles
"vizzapu" <>
NewsGroup User
Re: Convert a user control, so that it can be used as a web part.12/20/2007 12:35:59 PM

0

HI

 I am facing problem with user control  , i have created a usercontrol (ELRinfo.ascx, BorrowerInfo.ascx)  and now i want this user control to display in a web part  so i have created a Test.aspx page now i have draged the user Control ELRinfo.ascx and i complied it .. its working fine

when i add the other user control to same page then i am getting a compile Erorr  

C:\Documents and Settings\016577\My Documents\Visual Studio 2005\Projects\PLDSPortal> "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pldsportal\d804c86a\c18f338\assembly\dl3\213a8b41\00ea709c_b1e3c601\log4net.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pldsportal\d804c86a\c18f338\assembly\dl3\b66900f8\ae1b418c_d642c801\PLDS.Core.DLL" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pldsportal\d804c86a\c18f338\assembly\dl3\640e22b5\00c1f668_dde2c701\Corp.Frameworks.Configuration.DLL" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pldsportal\d804c86a\c18f338\assembly\dl3\2ea99eb9\62ea747f_0342c801\Tracksource.Security.DLL" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Security\2.0.0.0__b03f5f7f11d50a3a\System.Security.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.DirectoryServices\2.0.0.0__b03f5f7f11d50a3a\System.DirectoryServices.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /out:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pldsportal\d804c86a\c18f338\App_Web_headerloaninfo.ascx.9d820bf5.zrdvzin4.dll" /D:DEBUG /debug+ /optimize- /win32res:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pldsportal\d804c86a\c18f338\m8nh5kpn.res" /w:4 /nowarn:1659;1699;1701  "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pldsportal\d804c86a\c18f338\App_Web_headerloaninfo.ascx.9d820bf5.zrdvzin4.0.cs" "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pldsportal\d804c86a\c18f338\App_Web_headerloaninfo.ascx.9d820bf5.zrdvzin4.1.cs" "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\pldsportal\d804c86a\c18f338\App_Web_headerloaninfo.ascx.9d820bf5.zrdvzin4.2.cs"


Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.1433
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

c:\Inetpub\wwwroot\PLDSPortal\Controls\Header\HeaderLoanInfo.ascx.cs(912305,33): error CS0115: 'ASP.controls_header_headerloaninfo_ascx.FrameworkInitialize()': no suitable method found to override
function OnToggleTOCLevel1(level2ID) { var elemLevel2 = document.getElementById(level2ID); if (elemLevel2.style.display == 'none') { elemLevel2.style.display = ''; } else { elemLevel2.style.display = 'none'; } }
thanks in advance .. help in this issue

 

 

 

"vinz" <>
NewsGroup User
Re: Convert a user control, so that it can be used as a web part.12/21/2007 1:49:50 AM

0

 I guess the errors lies in your UserControl..  maybe you are writing a method within that user control that needs not to override... Check the methods and debug it....


Always remember to click ?Mark as Answer? if my replies helped you!

Learn through experience and grow from it...

vinz
SDE - .NET/ASPNET/C#
Koffeekoder Articles
"vizzapu" <>
NewsGroup User
Re: Convert a user control, so that it can be used as a web part.12/21/2007 3:39:39 AM

0

Hi

I havent created any method in the user control .. pitty was i am testing the user control, after the creation of design just tried whether working in the Page or Not ..  

 

 

 

 

"hoanguyen" <>
NewsGroup User
Re: Convert a user control, so that it can be used as a web part.12/22/2007 6:41:03 PM

0

My approach is to write a generic webpart then load the UserControl inside webpart (just like Son of the SmartPart). You can use EditorPart or ToolPart to edit some custom properties exposed by webpart. 

8 Items, 1 Pages 1 |< << Go >> >|


Free Download:













installation

null reference exceptions

when i click on apply name and password changes it keeps building a new user

portal side by side

can't open the portal project file in vs.net

how to get ibuyspy to work in the root directory of a website

runtime error on my machine, but not on the web server itself

portal admin tab not appearing

extending the menu - sub menus

implementing a tabtitle...

not automatically collapse thread in discussion module

up and down arrows does not work in page definition

please help - identifying users

request.applicationpath

bug: development of portal is falling apart - suggest forking the code.

defaultdesktop.aspx page error at run time.

e-mail module?

after website transfer to dev computer, signin.ascx won't load

help with ibs and webhost4life hosting

ibuyspy portal not starting properly

editing items in datagrid in asp.net 1.1

compiling changes for the sdk version

adding and existing control as a module

security issues?

whether there is book for asp.net portal starter kit

clarification of license agreement, item #2

error finding login.aspx

portal and server problem

outputcache does not work with ascx

cannot install ibuyspy portal

book review on "building an asp.net intranet"?

problems with create new admin account

linking back to the referrer

problem on 2000 server

whats the best

error on decrypt: length of the data to decrypt is invalid

how to disable autocomplete for text fields

error when running ibuyspy portal

portal stater kit login problem

adding delete confirmation to repeating controls

portal_loaddata.sql. error

help please - difficulties installing ibuyspy

ibs portal vs dotnetnuke

editing a module in a tab

performance tip

about modules for the portal site

simple design question

access to the path "f:\inetpub\wwwroot\portalvbsdk\portalcfg.xml" is denied.

forums inside portal

installation problems with ibuyspy 2005 delivery toolkit

   
  Privacy | Contact Us
All Times Are GMT