C# - Share A Web Page (asp) With Others?

Jan 19, 2011

Here is what I'm trying to do :

The user accesses a web page (asp.net web application), makes his selections and applies filters to render the screen. Now I'm looking for a way to share this view with somebody else who also has access to the application.

Although in a simple scenario this can achieved through query strings and sharing the URL, how can this be achieved in a more complicated scenario where a bunch of selections / filters are applied to render a view ?

To start with, I implemented a basic framework. A datastructure will hold key value pairs which represents the controls and the values associated with it. I persist this to a database and the page will be responsible to parse the key-value collection and render itself but I think this may not be practical when there are complex controls like a grid with features such as grouping, filtering etc.

Most importantly, it would be great if the solution does'nt force the aspx to be implemented in a certain way for them to be persisted.

View 3 Replies


Similar Messages:

Web Forms :: How To Include Share Icons And Share Options To Site

Jun 10, 2010

I need a code to have the ability to share my news on social networks.My site structure is in Asp.net and vb.net.

View 1 Replies

Social Networking :: Share Images On Facebook Using Share Button

Jun 29, 2013

I am showing thumbnail images in dataList on a page of my website. When i click on any image they open in big size. How i will share(Facebook). that particular big size image. My code is given below:

<script type="text/javascript">
var CurrentPage = 1;
function GetImageIndex(obj) {
while (obj.parentNode.tagName != "TD")
obj = obj.parentNode;
var td = obj.parentNode;

[CODE]..

View 1 Replies

How To Share Session Between Page In Page To Page Request

Aug 19, 2010

My application is simple, I have 2 pages:

RSSProducer.aspx: A page that generates RSS (XML) feeds
RssConsumer.aspx: A page that retrieves the RSS feeds and displays it to the user in a repeater control. To do this I am using the System.Xml.XmlTextReader to fill a DataSet with tables based on the RSS-XML retrieved from the RSSProducePage. A table within the DataSet is bound to the repeater control.

For example, this is what I have in my RssConsumer.aspx page:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Session("permittedToViewSomeDetail") = True
Dim url = "http://localhost/DevSite/RSSProducer.aspx"
Dim reader As New System.Xml.XmlTextReader(url)
Dim ds As New DataSet()
ds.ReadXml(reader)
myRssRepeater.DataSource = ds.Tables(2)
myRssRepeater.DataBind()
End Sub

My problem is that user-authorization details are stored in Session in the RssConsumer page that need to be accessed in the RSSProducer page (in this example it would be Session("permittedToViewSomeDetail") that I need to access in the RSSProducer page); however, the Session identifier is not common between the two. This means that I cannot access the authorization details in the RSSProducer page.

The reason for why is fairly clear to me:

User's browser makes a request to the RssConsumer page Server generates a Session ID (which is stored in a cookie) if there is no existing Session Identifer The RSSConsumer requests the RSSProducer page...which generates a new Session ID every time because no session identifier is ever going to be found.

I tried using cookieless session so that I could pass the SessionID via the URL to the RSSProducer page as an experiment but for some reason the XmlTextReader doesn't work well with this method (but the desired shared session does work). I've hit a brick wall here. Does anyone know how to share session between pages when one page makes a request to the other?

View 1 Replies

C# - Share A Master Page Between Projects?

Aug 3, 2010

We have several different MVC2 projects on the go and I would like to be able to share a single master page between them.

Is there an easy way to do this without recreating the same master page in each project?

View 1 Replies

Share Aspx Page Between Projects?

Mar 24, 2011

We have a solution with multiple web projects, and there are some pages that should be present in several of them. So we'd need some sort of a shared project which contains aspx files, and which can be referenced by other web projects.

Now there are a few implementations out there:

One implementation described by ScottGu which involves building the shared project, and than copying the output aspx into the host project, and referencing the dll of the aspx. This method has the disadvantage that if the apsx gets modified it must been recopied.

Another option, based on David Ebbo's post would be to convert the aspx into ascx-es which can be referenced as custom controls, and than include those custom control aspx-es into the host project inside of some placeholder pages. (This solution seems to be the most promising) But the concerns are: can all apsx pages transformed into an ascx? I mean there's no Page.LoadComplete to give an example.

And yet another option is to use virtual directories that map into the shared webproject, as described in a Microsoft KB article. The problem again with this method is that the shared aspx-es must be in predefined directories(that is the virtual directory). If the name of virtual directory overlaps a physical directory, the virtual overrides it and no pages from the latter can be used. Is it perhaps possible to merge these two together?

View 4 Replies

Web Forms :: How To Share A Page Between Two Master Pages

Mar 19, 2010

I have a master Page A and another master Page B.

I have a couple of pages inside both these master pages.

Now I want a page (freshly created one), to be shared by both of these master pages.

i.e. How do i dynamically say, if the condition is so and so, the master page loaded should be A, else it should be master Page B.

View 1 Replies

File.OpenRead() Accesses File On Share Within Workgroup But Not A Remote Share?

Mar 4, 2011

I have an ASP.NET MVC application that attempts to read a file in using a filestream and File.OpenRead().
When the path to the file is a share on the same workgroup, and I give access to NETWORK SERVICE for the share, this works perfectly as desired.

However, when the path to the share is a UNC path to a remote share within the LAN, with read permissions open for "Everyone", the "File.OpenRead()" method throws an exception saying "Could not find a part of the path".

In my test cases I'm debugging locally with the ASP.NET MVC app being given a UNC path to the computer that it's actually running on. It's a share on my C drive, being "Shared" with permissions to "Everyone" for read access.

Is there something in IIS that needs to be configured? If I try to impersonate, in this context, the impersonation doesn't matter because NETWORK SERVICE was the user trying to access the files when it worked for a share in the same workgroup.

View 2 Replies

Web Forms :: Share Object Between Page And User Control?

Dec 21, 2010

I have a page on which I placed a user control. In this page I create an object ("FilterState") that maintains some state information. There are controls on the page which alter and read the FilterState, and the user control needs to be able to alter and read this same instance of FilterState. Meaning that there is code inside the user control that needs to refer to this object and manipulate it.I'm stuck on how to share the same instance between the page controls and this user control.

If I declare a FilterState object as a property of my user control, and set this property value to the instance I created in the page code behind, I'm assuming that it's really just getting a copy of it.

View 4 Replies

C# - Share Libraries Without Using The GAC?

Sep 9, 2010

I have a library that is meant to be used by many websites. The way I am doing it now is in the library's properties, I set the "Post-build event command line" to: copy "$(TargetPath)" "$(SolutionDir)MyWebsitein$(TargetFileName)"

Every time I want a new website to use the shared library, I add a new line like this: copy "$(TargetPath)" "$(SolutionDir)MyWebsite2in$(TargetFileName)"

Is there an easy or better way to do this besides using the GAC?

View 1 Replies

How To Access To Share Folder

Mar 15, 2011

I need to temporarily access the network to separate directories. When do it I have access exception. I'm from Ukraine. not sure about the accuracy of the translation. "Logon not produced: Username or password not recognized"

access from my PC to the share directory I have >> Start >> Run >> \network addres

View 1 Replies

How To Get The Unc Share Name Of A Given Folder (If Shared)

Oct 26, 2010

How To Get The Unc Share Name Of A Given Folder (If Shared)?

View 2 Replies

C# - How To Share Sessions Between PHP And ASP.net Application

Mar 30, 2010

My company took some old php application over. Due to our preference to ASP.net and to the lack of any documentation from the previous developer, we do not want to spend much resources on developing in PHP. For implementing new features, we will create an Asp.net application that has the same look to the user. We want to develop a kind of 'coexisting' web application. Therefore we must share sessions between an PHP and an Asp.net webapplication project, because there is a usermanagement involved with an existing MySQL database.

(e.g. link 'A' directs to the PHP website, and link 'B' directs to the asp.net application)

How can we share the session between and PHP and an asp.net application?

And does anyone have a hint for this 'coexisting' thing, that might be useful in development?

View 5 Replies

How To Share The Same Style Between Few Websites

Jun 4, 2010

There is a website with a master-page, set of css-files,... menus. It is necessary to implement another one that will have same (or at least very similar) look-and-feel. And also it is necessary to have look-and-feel in sync.

I've tried to find for appropriate solution (at least idea, not implementation) in the internet but didn't find anything.

use an additional project (class library) that will contain an implementation of the master-page and all its comnponents (menus, images, css, etc will be stored as resources), this project will be refferenced from all web-sites that need to sare look-and-feel.

View 2 Replies

How To Share Session Into WCF Service

May 27, 2010

Im using asp.net website with WCF service, having wsHttpBinding,Aspnet compatibility enabled, specified as Sessionmode -allowed, service behavior- isinitiated and client session cookie enabled. Its looking like Asp.Net session object and WCF Session( HTTPContext.Current.Session) work independently. How can I share Asp.net Session value to WCF Session and vise versa.

View 3 Replies

How To Share Data Between Threads

Nov 1, 2010

In the main thread I open a new thread that gets the number of new messages of user (takes about 5 secs) and this second thread should save the number in some place.

In the main thread I should check the "some place" and if the value exists I display it on the page.

Where can I save the value from the second thread to read it from the main one? This value is unique per user so I can't use static field.

View 3 Replies

Share A Image Between Two Websites By Using Mvc?

Aug 11, 2010

I have two web applications which need to show products' images, but how to let them share the images?

for example, I have websites with urls: [URL]

how could I upload images, store them and share with this two websites?

View 1 Replies

MVC - Share Partials Between Areas

Mar 5, 2011

is there some way to share a partial razor view between areas? For example a login partial, it is found if i use @Html.Partial("_LoginPartial") but the URLs Html.ActionLink generates are local to the calling area (even though the partial itself is not part of the area).

_LoginPartial.cshtml is in /Views/Shared/_LoginPartial.cshtml
Calling view is inside /Areas/Somearea/Views

Links generated are like: [URL]
But should always be: [URL]

Partial view source:

@if(Request.IsAuthenticated) {
<text>Welcome <b>@Context.User.Identity.Name</b>!
[ @Html.ActionLink(@Messages.Logout, "Logout", "Account") ]</text>
}
else {
@:[ @Html.ActionLink(@Messages.Login, "Login", "Account") ]
}

View 1 Replies

MVC :: Share Session In 3 Projects?

Mar 29, 2011

I have created two websites ,such as [URL] and [URL]; The two websites both use SQL Sever Session Mode and they use the same database for sessionstate management.

in [URL],I have a controller as below:

public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Message = "Welcome to A Site!";
Session["User"] = 123;
return View();
}
}

[URL] I have a controller as below:

public class HomeController : Controller
{
public ActionResult Index()
{
if (Session["User"] != null)
{
ViewBag.Message = "Welcome to B Site!" + Session["User"].ToString();
return View();
}
else
{
ViewBag.Message = "Welcome to B Site!" ;
return View();
}
}
}

if I access [URL] first ,then access [URL], I will get the response :Welcome to B Site!123 if I access [URL] first,then access [URL] then access [URL],I will get the response:Welcome to B Site.

View 4 Replies

Use A Facebook Share From Website?

Jun 7, 2010

how to use a facebook share from my website. I.e if I want this post to be on facebook, how do I incorporate it[URL]

View 2 Replies

Share App_LocalResources Between A Few Pages?

Mar 2, 2010

Is there any way to use a common RESX file for a few of my ASPX pages?The default naming convention seems to be NameOfWebPage.aspx.resx so it seems like there is a 1 to 1 mapping...

However it would be REALLY convienient if i could make a few of my ASPX pages all use the same RESX page, because they are mostly using the same strings and its stupid to have a separate RESX for each page.

I know about GetGlobalResourceObject() but my application is very big and it doesnt make sense to make the strings global when they are really only needed for these few pages.

View 2 Replies

SQL Server :: UNC Share ERROR?

Feb 21, 2011

i have created a database using visual studio server explorer tool & here is my connection string that i used to access it

<add name="ConnectionString" connectionString="Data Source=NEERAJ;AttachDbFilename= |DataDirectory|BlogDb.mdf;Integrated Security=True;"/>

but whiling trying to run project it keeps me throwing this error..An attempt to attach an auto-named database for file F:CustomBlogApp_DataDatabase.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

View 2 Replies

Share Cache Between Web Service And Web Application?

Mar 19, 2010

I would like to create a web application that gives an overview of all latests builds of a Team Foundation Server (TFS). The original idea was to simply query the TFS for all these builds and display the results using html. Now the problem is that this is just too slow. It takes around a minute to get the required informtion. I can't inluence this, it is just given. So I came up with the idea of caching. I could cache all results for a certain period of time and then invalidate the cache but as soon as the cache expires someone that uses the application will have to wait again which is not that nice.

The Team Foundation Server is able to notify whenever a new build is available. So basically the idea is that the application could react on that notification. In order to be notified I have to write a web service and register it with the TFS. That worked pretty well so far. The web service is now notified whenever a new build is done. Now I would like to connect my web application to the web service and whenever the web service is notified by the TFS update the cache of the web application. Here starts the problem. How can this be achieved? First I thought that the web service could fire a .NET event and the web application could react on that event but that does not seem to be possible. The next idea was that both the web service and the web application could use the same cache. The web service could then directly update the cache with the build information it receives from the Team Foundation Server but I am not even sure if this works.

Can a web service and a web application share the same cache? The web service doing something like Cache.Add("key", buildInfo) and the web application buildInfo = Cache["key"]. If not what other approach could be used to solve such a scenario?

View 4 Replies

C# - How To Share Code Between Pages And Masterpages

Sep 13, 2010

Now, I'm working on a project where I don't really understand how can I do things without multiple inheritance, without duplicating code.

Here's the situation. There is a website with a home page and other pages inheriting from a masterpage (the home page does not inherit from). Both the page and the masterpage are performing some stuff: custom login, statistics, loading of users settings for customization, etc. For the moment, the solution is crappy, since the source code for those tasks is just copied twice.

The home page class inherits from Page. The masterpage, on the other hand, inherits from Masterpage. Logically, it would be great to inherit from a common class too, but it's multiple inheritance, so it's impossible.

So what to do instead?

I thought about several ways, but dislike them:

Create a standalone class which will be called from the page/masterpage class. So for example instead of writing bool isDisplayingTips = this.CurrentUser.IsDisplayingTips, I would write bool isDisplayingTips = this.SharedObjects.CurrentUser.IsDisplayingTips. I don't like it, since it's longer to write. Create a "real", empty, common masterpage, and inherit both the home page and the masterpage from it. Not only it will require to write more code to access masterpage parameters, but it will also slow the things down, requiring an additional masterpage on each request.

View 4 Replies

How To Share Webpage With Social Network

Mar 29, 2011

Hey I have a web page and I wish to share a link or tell a friend about this page.So,when I click the share link then the System shall execute AddThis Wigit(fb,twitter,google,myspace...) etc.

What is the C# code that execute this implimention.

I am using MVC

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved