Showing posts with label developing. Show all posts
Showing posts with label developing. Show all posts

Saturday, March 24, 2012

ASP.NET 2.0, Ajax, webparts enabled portal site

I'm not sure where to post this specifically but myself and a co-worker have been developing an asp.net 2.0 site for our internal employees. It has been a great project with many, many stumbling blocks but we have pretty much gotten a handle on the darn thing to work as we envisioned. This site makes use of the asp.net 2.0 webparts functionality that attach on the back end to Microsoft Sharepoint, SQL, Oracle, and RSS feed data to create an extremely dynamic, up-to-date site. In order to acheive this functionality we had to implement customized functionality for the webpart catalog zones, webpart zones, page fire events, etc. Some of the things we did:

Ajax enabled browsing (for IE 6,7, we are working on the firefox implementation)

Webparts that attach to sql, oracle, Sharpoint services, RSS feeds

Page "tabs" that can remember webpart locations, data, etc.

Full theme support for as many themes as our lazy butts felt like coming up with (a few screen shots below)

User customizeable RSS feeds as well as static ones

Custom catalog zone with accordion controls and popup descriptions of "gadgets."

Custom weather items (data provided by weather bug)

Flickr photo gallery "gadget"

Dynamic static and modifiable pages for the different departments for customized content (we use a .uscx "gadget" that can save the current page "state" into a sql database)

Cool Design! (at least I think so :-)

At the bottom of the post should be some screen shots of the site. It's internal so ya' can't get to it through a browser but hopefully the screen shots will give an idea of where we went with this. When a user first visits the page, they are presented with a "wizard" where they can choose the type of user they are. Once they finish the wizard, we wrote custom code to read from a sort-of 'template' database that adds the webparts to the respective zones on the page in the order and location that we previously specified. As you can see the webpart functionality is heavily modified and I think it turned out pretty good! We lopped off alot of the standard bars and things and added our own styles using custom css and theme files.

If you have quesitions or what not, I can provide code snipets for sure. We are not master coders by any means and this is my first asp.net project but I hope to be as helpful as possible. any feed back would be cool! contact me at rstillwell <at> broomfield <dot> org.

THanks!

wizardAlso,

Default Theme (vista)

BlackTheme

Cool work!

It really looks nice!


Gentleman,

Is this really implemented with Webparts. Can you help me to understand the architecture of this application, as i read form your post that you have used, Sharepoint as well in your application.

In a nut shell, can you help me to understand to replicate the same. This will be a learning curve for my knowledge


Yeah the whole site is built around webparts. Sure I can help. Yes that is correct we tap into the sharpoint lists using xml stream readers. What would you like to know specifically?


Thankyou very much... before we go further, pl give a look athttp://www.codeproject.com/Ajax/MakingGoogleIG.asp, this page clearly explains how to create a dynamic content web app as step by step.

Now, coming to your help, can you help me to teach me as step by step to get going with your kind of web app. Apart of this, can we discuss offline, inother words, can we discuss off the track with this thread?

If you are interested, you can reach me at MSN Messagern withdskcheck@.msn.com id, damaraju_skc@.yahoo.com at yahoo messanger,varthy@.gmail.com at gtalk.

ASP.NET 2.0 AJAX WIndows 2003 Server - SYS UNDEFINED ERROR

I am developing one of my web sites where I am trying to implement AJAX and when I deploy it to Windows 2003 server with IIS 7, I get sys undefined JavaScript error. I searched every article on Google and did not find solution to solve it.

I am using ASP.NET 2 AJAX on IIS 7, Windows 2003 platform.

Web site where I am implementing it called47mileads.

Thank you very much for your help!!!

GK

Is the web.config modified to be ajax enabled?

Is Ajax installed on the webserver? OR Are the ajax extention dll's in the bin folder of the website?

==> You should answer YES to both questions; otherwise you get the error you mentioned above.

Kind regards,
Wim


I started project as AJAX enabled project and I tried both adding dll to bin etc...

I mean dlls not needed in bin since I am not using toolkit (but I added ajaxcontroltoolkit.dll as well). Page where it is happening:http://www.47mileads.com/Account_Login.aspx

Still same error.

Thanks,
GK


It looks like you're referencing the client side framework before it has loaded. This should be exactly what you need: http://encosia.com/2007/08/16/updated-your-webconfig-but-sys-is-still-undefined/


47mileadsdotcom:

I started project as AJAX enabled project and I tried both adding dll to bin etc...

I mean dlls not needed in bin since I am not using toolkit (but I added ajaxcontroltoolkit.dll as well). Page where it is happening:http://www.47mileads.com/Account_Login.aspx

I am not talking about the ajaxcontroltoolkit.dll here.

But I'm talking about the System.web.extentions.dll and the system.web.extentions.design.dll.

Lets say you install Ajax locally. Then those dll's get installed in the GAC (global assembly cache). This way they are accessible to all applications. Therefore they do not need to be included in the BIN of the application.

BUT: Lets say you deploy your application to a webserver. On this webserver, there is NO ajax installed, so NO dll's in the GAC of the webserver. NOW both ajax dll's need to be in the BIN of your application!

Could you please comment on my observations? Regarding the fact that I'm wrong / Or right! :)

Kind regards,
Wim


I installed ajax on the web server as well. Still not working. I also have visual studio on the server installed and I create ajax enabled web application on the server and as soon as I convert it to the web site I get sys undefined.

Thank you very much for your help.

GK


Hi GK,

im not sure but I think I heard this problem before and I think that reinstallation is the only solution (but please try to verify that through articles or threads on the internet)

try reinstalling the asp.net framework, and iis and the ajax framework.

kind regards,
wim


Are you using any URL rewriting on your site?

When I try to load your WebResources and ScriptResources, I get a 404 error. The "Requested URL" makes me wonder about rewriting issues:

Server Error in '/' Application.

The resource cannot be found.

Description:HTTP404. The resource you are looking for (or one of its dependencies)could have been removed, had its name changed, or is temporarilyunavailable. Please review the following URL and make sure that it isspelled correctly.

Requested URL:/.aspx



Yes, I use URL rewriting, but page "account login" does not use URL rewriting.

GK


Hi GK,

But as you said above, even if you create an out-of-the-box ajax enabled website, without extra functionality, even then you get the error no?

This makes me guess something is wrong with the installation ...

Wim.


47mileadsdotcom:

Yes, I use URL rewriting, but page "account login" does not use URL rewriting.

It doesn't itself, but it appears that your rewriter might be interfering with the WebResource and ScriptResource requests embedded in the page (which are used to set up the ASP.NET AJAX functionality on the client).

See if you can globally exclude *.axd requests from rewriting.


I created web application in the same directory as my web site on the server. Error I got was update pannel class reference in the code was not found. I referenced System.Web.Extensions DLL and it started working. When I was developing this project on my local box I did not have to reference System.Web.Extensions DLL since it was already referenced in my web.config. AJAX was installed on my server but web extensions assembly was not accessible from web.config. All you have to do is reference System.Web.Extensions in your references before you deploy your project.

Thank you very much for your help!!!


GK

asp.net 2.0 ajax website menucontrol : javascript error :"Microsoft JScript runtime error:

i m developing application using ajax in asp.net 2.0 . I m using menu control of asp.net,multiview and view control.while running this application i got error "Microsoft JScript runtime error: '0.cells' is null or not an object" so now what is the solution of this i have returend following coad in html

<

div>

<

asp:UpdatePanelID="UpdatePanel2"UpdateMode="Conditional"runat="Server"><ContentTemplate>

<tablecellpadding="0"cellspacing="0"border="0"width="100%"><tr><tdwidth="6%"><asp:MenuID="Menu1"runat="server"DynamicHoverStyle-BackColor="Aqua"DynamicHoverStyle-Font-Overline="true"DynamicHoverStyle-ForeColor="Brown"DynamicMenuItemStyle-BackColor="Crimson"dOrientation="Horizontal"StaticEnableDefaultPopOutImage="False"OnMenuItemClick="menu_click"Orientation="Horizontal"><Items><asp:MenuItemText="Operator"Value="0"></asp:MenuItem><asp:MenuItemText="Visitor"Value="1"></asp:MenuItem></Items><StaticMenuStyleBackColor="White"/><StaticMenuItemStyleBackColor="White"/><StaticSelectedStyleBackColor="#FFC080"/><StaticHoverStyleBackColor="#80FFFF"/></asp:Menu><asp:MultiViewID="MultiView1"runat="server"><asp:ViewID="op"runat="server"><tablewidth="30%"><trvalign="top"><td>hetal</td></tr></table></asp:View><asp:ViewID="visitor"runat="server"><tablewidth="30%"><trvalign="top"><td>tarun</td></tr></table></asp:View></asp:MultiView></td>

</tr>

</table>

</ContentTemplate>

</

asp:UpdatePanel>

</

div>

please give me solution for this error...thank u

<asp:menu > control seems to be not compatible withUpdatepanel. Put the menu control outside the updatepanel. If you wantto refresh only updatepanel contents on click of menu control, then setmenu control as an async postback trigger for updae panel as givenbelow.

try following modified code.

<div>
<asp:Menu ID="Menu1"runat="server" DynamicHoverStyle-BackColor="Aqua"DynamicHoverStyle-Font-Overline="true"DynamicHoverStyle-ForeColor="Brown"DynamicMenuItemStyle-BackColor="Crimson" dOrientation="Horizontal"StaticEnableDefaultPopOutImage="False" OnMenuItemClick="menu_click"Orientation="Horizontal">
<Items>
<asp:MenuItem Text="Operator" Value="0" ></asp:MenuItem>
<asp:MenuItem Text="Visitor" Value="1"></asp:MenuItem>
</Items>
<StaticMenuStyle BackColor="White" />
<StaticMenuItemStyle BackColor="White" />
<StaticSelectedStyle BackColor="#FFC080" />
<StaticHoverStyle BackColor="#80FFFF" />
</asp:Menu>
<asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="Server">
<ContentTemplate>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="6%">
<asp:MultiView ID="MultiView1" runat="server" >
<asp:View ID="op" runat="server">
<table width="30%">
<tr valign="top"><td>hetal</td></tr>
</table>
</asp:View>
<asp:View ID="visitor" runat="server">
<table width="30%">
<tr valign="top"><td>tarun</td></tr>
</table>
</asp:View>
</asp:MultiView>
</td>
</tr>
</table>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Menu1"EventName="MenuItemClick" />
</Triggers>
</asp:UpdatePanel>

</div>


You can also add the below script to your aspx page. It overrides the AJAX function and takes care of the error. This works for problems with Tab Controls too, seehttp://forums.asp.net/thread/1628780.aspx.

<scripttype="text/javascript">

var oldMenu_HideItems = Menu_HideItems;if(oldMenu_HideItems)

{

Menu_HideItems =

function(items)

{

if (!items || ((typeof(items.tagName) =="undefined") && (itemsinstanceof Event)))

{

items = __rootMenuItem;

}

if(items && items.rows && items.rows.length == 0)

{

items.insertRow(0);

}

return oldMenu_HideItems(items);

}

}

</script>