.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Re Reuse

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :ASP.Net


Analagous to composing a webpage that imports other pages via frames, is it possible to write a page that imports specific functionality and i/o from one or more existing ASPNET apps? In other words, how can I go about "mosaicing" existing ASPNET pages into new forms -or- create "views" of existing ASPNET apps (preferrably without having to wrap them in MVC projects)?






View Complete Post

More Related Resource Links

Reuse a gridview within calendar control


Hello, I have a calendar control that will have events displayed within each cell.

I want to use a pre formatted gridview and simply bind the gridview with a dataset dynamically and display it within the cell of the specified day.

Is there a way to do that or do I have to dynamically build a gridview for every day that there is an event? 

So here is the template gridview and datasource:

 <asp:SqlDataSource ID="sqlcalitemtemp" runat="server" 
        ConnectionString="<%$ ConnectionStrings:NNTrainingdbconnection %>" 
        SelectCommand="SELECT NN_Fire_Events.Start_Time, NN_Fire_Events.End_Time, tblNN_Fire_Cli

Cutting Edge: Code reuse in WPF and Silverlight 2.


There's a strong similarity between Web-based Silverlight 2 applications and desktop WPF applications. Enabling easy code reuse between the two is Dino's focus here.

Dino Esposito

MSDN Magazine October 2008

AOP: Aspect-Oriented Programming Enables Better Code Encapsulation and Reuse


Aspect-oriented Programming (AOP), a paradigm invented at Xerox PARC in the 1990s, lets the developer better separate tasks that should not be inextricably tangled, such as mathematical operations and exception handling. The AOP approach has a number of benefits. First, it improves performance because the operations are more succinct. Second, it allows programmers to spend less time rewriting the same code. Overall, AOP enables better encapsulation of distinct procedures and promotes future interoperation.

Dharma Shukla, Simon Fell, and Chris Sells

MSDN Magazine March 2002

How to reuse a SSL-Session

Hello, I connect to a server using ftps (ftp over tls).  Both the control-connection and the data-connection shall be encrypted as specified in RFC4217. I use .net 2.0 and the SSLStream to initially establish the control-connection and this works just fine. For transferring any data encrypted using the data-connection i have to resume the SSLSession of the control-connection. The Server does not only support this but also requests this behaviour in order to establish a valid data-connection. My problem is now: how do i set up an encrypted connection that uses an already negotiated SSLSession. I havent found any references about that topic in the net and SSLStream doesnt seem to support it. My first hope was the cache of the framework to reuse any cached sessions for new ones but this didnt work. Thanks in advance for any helpful hints. Roland Peters ps.: you can delete this post, moved it now to networking

Is it Possible to Reuse a Trigger on Multiple Controls Easily?

I have a simple trigger that is generic such that I would like to reuse it on 15 different labels. Can I define it in one place somehow and just assing it to each of the labels rather than just pasting the same code into the style for each label?

most reuse

The idea of making one business application for multiple use is pretty attractive. I imagine you'll always have to make some kind of alteration for target use but I'm also very willing to believe different coding styles can work for or against you. As far as ASP.net business crud applications isn't sticking with web forms your safest way to be able to more easily alter the app for a sharepoint webpart, asp web-part and/or mobile app? If not, which, MVC? If neither, which covers most bases? Why?

Reuse DataReader, or dispose?

I created a DataReader (DR) object.I opened it, pulled data, then closed the DR.Now I need data from a second table. Do I dispose the original DR and create a new one? Or should Just reuse the existing DR to open/pull/close?I may do this a hundred times in my progam.-The Le

The client was unable to reuse a session with SPID 58, which had been reset for connection pooling.

HI I am getting the below error on - Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (Intel X86)   Apr  2 2010 15:53:02   Copyright (c) Microsoft Corporation  Standard Edition on Windows NT 6.0 <X64> (Build 6002: Service Pack 2) (WOW64)  ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 2010-09-08 14:34:08.81 spid58      Error: 18056, Severity: 20, State: 29. 2010-09-08 14:34:08.81 spid58      The client was unable to reuse a session with SPID 58, which had been reset for connection pooling. The failure ID is 29.  This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message. ----------------------------------------------------------------------------------------------------------------------------------------------------------------- I restart the IIS server and SQL server since then until today I haven't face similar error. However, I want to understand the reason for it and how to avoid such errors in future. Thanks

Can I reuse content with SharePoint 2010

I am an IA working with a client on creating a new intranet using SharePoint 2010. I do not have noteworthy experience with MOSS 2007 or other MS EMS/CMS tools or technologies. My question is this, from a page design standpoint, does SharePoint offer/support content reuse. For example, if I have a piece of content on a particular page (not a web part, but actual content), can I re-use that content on other pages without copying it, retyping it, or otherwise duplicating effort. That is, can I point to a piece of content where it "lives" and then draw out various other pages using the same content. My limited experience with other CM tools makes me think it SHOULD be possible using meta data or some other approach, but I have not identified a way in MOSS 2010. Thanks - Jeff

Windows 7 socket bind behavior difference from XP/Server 2003, with reuse address socket option (WSA


I have two processes that are both listening to UDP packets and can run on the same PC.  One process binds a socket to one NIC address with port 18246.  The other process has two Socket objects, one for sending on port 18246 and one for listening on port 18246.  Both of these sockets are created, have the SO_REUSEADDR socket option set.  Bind is called for a single IP Endpoint for a common local NIC address, but a different one than used by the above app.

Under Windows XP and server 2003, both processes can bind regardless of order of startup.

Under Windows 7, if the process with only one socket starts first, the second process fails with WSAEACCES 10013 error with the second socket bind.

I wrote a sample C# app with the following method that fails when running under Windows 7 x86 and x64.  The above failure occurs when the sockets are in separate processes, but a single process using the same socket interaction also fails.  The below method is called with two IPV4 addresses that are assigned to local Network adapters on the PC.

New DSV named query or copy and reuse an existing cube dimensions (is the latter valid) - SSAS 2008


I have a [DateAsAt] table in the DSV. This is linked to 3 fact tables to analyse and slice them from an as at date perspective (lets call them FactA, FactB and FactC). But I want to reuse this dimensions (almost like an alias) and although I have tried this and it seems to work, I just want to follow some due dilligence to make sure what I am doing is valid.

I have not created a new Named Calculation for a new date dimension that will be used in a Transactional way (not an as at way), and in stead simply copied the [DateAsAt] dimension, and pasted it back into the dimensions section of the cube (the default name it was given was [DateAsAt 1], but I changed it to [DateTransaction].

Although the relationship between the [DateTransaction] dimenion's source in the DSV (I.e. [DateAsAt]) is linked to FactA, FactB and FactC, I set a new dimension relationship between [DateTransaction] and FactTransactionD in the Dimension Usage area of the cube.

Is this valid? or MUST I create a seperate source for [DateTransaction] in the DSV and set its relationships there?

Cant reuse Http connections. No KeepAlive header. HttpWebRequest.KeepAlive = true;


I tried to reuse Http connections setting KeepAlive but it simply doesnt work. I looked in the Http messages using Feedler and Charles but all I can see is Connection: close in response. I am sure I use HTTP 1.1 as it says so in the request.

I see 600 TCP connections in wait state opened by 10 threads. Each thread run one http request at a time.

There is also bunch of responses which say - the unauthenticated request. The service requires digest authentication. Why some requestes fail to be authenticated?? 

P.S. I just found this thread: http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/87bc7029-ce23-438a-a767-f7c32dcc63a7 and I tried to set UnsafeAuthenticatedConnectionSharing = true but still my TCP connections are not reused.

    static void GetRest(string rest) 

Reuse XAML Declarative Workflow in Workflow Service (xamlx) Results in Server Error of System.Argume


We attempted to reuse a XAML (declarative activity workflow) in a few places within the same XAMLX and it doesn't appear to allow this.   On the WCF client side, it reported an obscure error of something to the effect of unknown message received and a communication error stating the service instance couldn't be used at this time and to ensure the call order is correct or order delivery guarantee is enabled.   However, this appears to mask the true issue which is on the server side.   Apparently, when the server side WCF end point is trying to start the workflow instance, it throws this error building a dictionary of workflow children...

System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Activities.Debugger.InstrumentationTracker.InitializeUninstrumentedSubRoots()
   at System.Activities.Debugger.DebugManager.EnsureInstrumented(Activity activity)
   at System.Activities.Debugger.DebugManager.OnEnterState(ActivityInstance instance)
   at System.Activities.Debugger.DebugController.ActivityStarted(ActivityInstance activityInstance)

How can I reuse Model Metadata for custom View Models?



I'm working on an ASP.NET MVC 2 project with some business entities that have metadata dataannotations attributes applied to them (Validation attributes, Display attributes, etc.).

Something like:

//User entity
public class User

[Required(ErrorMessage = "Vorname fehlt")]
[StringLength(MaxNameLength, ErrorMessage = "Vorname ist zu lang")]
public string FirstName { get; set; }

Is it possible to Reuse or Customize a Dashboard Designer generated scorecard in Visual Studio2010?


I am designing a demo bi system.

There will be a scorecard with region and related sales information(target and achieved value) at the left screen,and a bing map at the right, and the map will be relocated when some region is selected on the left.

I am thinking about create two web part, using Dashboard Designer to make the scorecard,and silverlight with the bing map.But have no idea how to connect the map with the scorecard. Totally new in this area(SharePoint,Asp.Net), any advise or comment will be thankful.


Can i reuse MOSS custom membership provider in SPS 2010


I have a MOSS 2007 site which uses the fba  with ustom membership provider. and now i want to reuse that membership provider in the new SPS 2010 claims based authentication which supports FBA.

Here, my question is  can i reuse the DLL which created the custom membership provider and deploy ti in the new sps 2010 environwemt?

will that suffice? i will  deploy the dll in new sps 2010 central admin web.config and sts toen service webconfig and my custom web appln's web.config. wil  tyhat enoughto up& runnning the new web appln with FBA enabled?

i am validating the users against a web service in teh MOSS envmnt.

Can anybody help me the right appraoch with links/resources.





PrasadWT PrasadWT

How to reuse List Template


I have created a list and saved it as a Template , now I have a .stp file.
I want to reuse this list in another site how can I import my .stp file??

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend