Vb.net - How To Embed A SilverLight Control In C# Control
Apr 29, 2010
We have a ASP.NET web application written in VB.NET where we build content programmatically during the Init event.
We make extensive use of user controls, building them on the fly, and I now want to start including SilverLight content.
Is there an easy way of embedding a SilverLight application in a control, and then instantiating the whole thing in code, in the same way as you'd programmatically add ordinary ASP.NET controls to a page?
The SilverLight component itself works fine when added to a page using the <object> tag but I really want to be able to reuse it elsewhere in code.
Since I'm expecting use of SilverLight to increase in our application, and the asp:Silverlight control seems now to be deprecated, I'm looking for an alternative way of wrapping the content.
View 1 Replies
Similar Messages:
Dec 26, 2010
I have a main silverlight control named MainPage.xaml in an asp.net web site.
I want to dynamically add and remove control at run time.
So, I have created another control Top10.xaml and added to selected canvas area on MainPage.xaml as described on this page(Click Me):
Now i need to modify Top10 visibility in MainPage.xaml dynamically when a button is clicked on MainPage.xaml using C# code in MainPage.xaml.cs.
View 1 Replies
Feb 21, 2010
How to embed silverlight xap into aspx page. I have created students database. I want to keep search option to find student name. It should be done in silverlight. I want to embed that silverlight in aspx page.
View 6 Replies
May 12, 2010
I'm new to silverlight and sketchflow. I'm getting on great with creating prototypes and can export to Word etc.
I would really like to embed a prototype in another web page - is this possible and how would I go about it?
View 1 Replies
Feb 14, 2010
I've created a silverlight application, MainPage.xaml has silverlight controls. The code behind of it will be definately in MainPage.xaml.cs file. When creating a silverlight app, I've selected a default web project wherein this silverlight app will be hosted and run. After all my work in MainPage.xaml.cs file, I want to integrate it in my default.aspx file. As i understand, I need to give reference to xap file in this aspx file. I tried accessing
<asp:Silverlight ID="xx" runat="Server.. />
tag but had no luck. This tag does not come up, Am i missing to add reference to any silverlight dll to my web application. Or is this tag applicable for Silverlight 2.0 and not 3.0 which I'm using:
<object data="SilverlightEmployeeExampleTestPage.aspx" width="100%" height="100%">
<param name="source" value="../ClientBin/SilverlightEmployeeExample.xap" />
</object>
View 2 Replies
Sep 8, 2010
I emebeded jquery library in custom server control. but it's not working. it throws "object expected error". the complete code listing is given below.
jquery-1.4.1.js is rename it to jquery.js
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;.........
View 1 Replies
Feb 15, 2010
I am going to create a web server control representing a treeview. So I want to use 2 images for + and - for expand/collapse. How can I build this into the control in a way that can be used as image source when rendered on the page?
Since this will be in a compiled web controls library, I don't want to rely on external images in the web application.
Edit: Based on this answer by Andre Kraemer I did the following:
In AssemblyInfo.vb:
<Assembly: System.Web.UI.WebResource("MyCompany.MyWebControls.Resources.plus.gif", "image/gif")>
<Assembly: System.Web.UI.WebResource("MyCompany.MyWebControls.Resources.minus.gif", "image/gif")>
In my RenderContents override:
Dim lPlusImage As New WebControls.Image()
Dim lMinusImage As New WebControls.Image()
lPlusImage.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "MyCompany.MyWebControls.Resources.plus.gif")
lMinusImage.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "MyCompany.MyWebControls.Resources.minus.gif")
lPlusImage.RenderControl(output)
lMinusImage.RenderControl(output)
My Assembly name is MyWebControls.
My Root Namespace is MyCompany.MyWebControls.
The images plus.gif and minus.gif are located in a folder named Resources, and the images have Build Action set to Embedded Resource.
It still does not work. I get no errors. I have tried the generated image url directly in the browser, bot nothing happens, just a blank page.
Note: I tried to use an invalid path in the resource name, and the result was exactly the same, which made me wonder if I need to do something special to map the actual resource to the resource name. I got a 404 Not Found error only if I used different name in the code than what was specified in AssemblyInfo, it had nothing to do with path was pointing to an actual resource!
View 3 Replies
Apr 14, 2010
If i have two aspx pages in each of them i want to put differents silverlight contents (2 differents usercontol) what can i do?.. am i obliged to add 2 silverlight projects with my asp.net website and insert in each page an *.xap content..?
View 1 Replies
Apr 15, 2010
I have a user control in silverlight which contains both XMAL and .cs file. But I wanna make it into a base control. In other word,I can make a control inherited it whose area in it can be edited. Just like Master Page in asp.net,you know. In the base control,I only have a lot of description in XMAL,perhaps it can be described in the .cs file,too.
View 1 Replies
Oct 26, 2010
I am using Visual Studio 2010 and I am working with a simple asp.net website project. I don't see any silverlight controls in the toolbox. Even after right clicking the toolbox and choosing the elements from the silverlight tab I still don't get anything in the toolbox. I even restarted Visual Studio but get nothing.
View 2 Replies
Nov 1, 2010
I want to add a silverlight control to a div panel at runtime (dynamically) ( on an aspx or user control). How can one achieve this?
View 1 Replies
Feb 21, 2011
Iīm just starting to program for the web, so please bear with me. I need to develop a website with a connection to a database. I would like the database to be access, but if necessary I can upgrade it to sql server. In visual web developer, I know how to connect to the db, and it works so for the moment thatīs ok. However... thereīs got to be something very wrong with the vwd. Even the simplest things donīt work. I canīt even place a textbox right. when you change a property, nothing happens. The controls are all over the place, they even move from the default.asp to the master page. 90% of the time is spent on trying to figure out how to get rid of borders from a table and such stupid things (wich by the way is impossible). So I thought of silverlight.
But then of course thereīs the thing with the data interchange. Iīve learned to send variables via querystring. However that wonīt do when I want to dsiplay a large table of data in a gridview for instance. So Iīve gathered Iīm supposed to use RIA. I studied this tutorial [URL] Itīs just that when Iīm supposed to put the domaindatasource control on the asp page, itīs not there. And when I try to add it via the "choose item", itīs not in the .net list. Itīs in the silverlight list though. Is vwd supposed to be this bad? Itīs ridiculous really. Or did I mess up the installation? I use the express version of 2010. If you know of a good tutorial please point me in that direction. I donīt know any c# though so that wonīt work.
View 5 Replies
Mar 1, 2010
Can any body tell me how to add silverlight 3.0 control in master page in asp.net 3.5 (ide VS2008)?
View 2 Replies
Feb 15, 2011
i have made a user control carrying a grid which is showing different uploaded images , description etc. I am putting this in another aspx page and want to fetch the values of the silverlight grid. I have made a class file for that but unable to get the grid collection.
View 1 Replies
Feb 22, 2010
i have many css problems with asp:menu /here is one of them
i use this slideshow http://www.codeplex.com/SlideShow
on top of it i have asp:menu
when i hover over the menu i didnt view the child item correct
View 1 Replies
Feb 21, 2010
I know silverlight page doesn't make postback itself but does event fired from silverlight control postback whole asp.net page If this silverlight,control embedded in aspx page?
View 2 Replies
May 19, 2010
I have a silverlight application project in my solution. The other project is a web application project that has a .xap file in ClientBin.
When I created the silverlight project, it asked if I wanted the asp.net application to host it (and I said yes).
In the root directory, there is a test page for the silverlight control. That loads the control.
In another directory, I insert the SAME asp markup to get the silverlight control to launch again.
Nothing happens.
Why would the silverlight launch on one page and not on the other? how to documentation about dependencies that I might not know about?
I've put a reference to Silverlight.js on the page as well.
Here's the markup:
[code]....
View 1 Replies
Sep 1, 2010
Where can I find a silverlight 3 or 4 user control that contains multiple file upload and resize capability?
UPDATE:This will be used for uploading images. We'd like to resize the images prior to posting up to the server.
View 2 Replies
Dec 8, 2010
Can a ASP.Net 4.0 Web Aplication use (or host) a silverlight control directly without first creating a Silverlight Application
View 4 Replies
Mar 20, 2010
Can a custom user control embed another custom user control?is this "bad practice"?eg if i have a custom user control named "Forums" then 2 more custom controls that are "Read_Forums" and "Write_Forums"and all i need to call is "forums" in the page asking - and then it will put in both functionalities..
View 2 Replies
Apr 29, 2010
Is there a generic control that can be added to all aspx pages that checks for silverlight plugin and the version.. I know there is javascript and the silverlighthost object tag that accomplishes this. Is there an existing ascx control that wraps this functionality ? I need to be able to set the path to the xap on each page (via a property on the ascx control).
View 2 Replies
Oct 25, 2010
I want to embed a silverlight app into a web page and have the height/width of the div that contains the silverlight control match the dimensions of the actual size of the silverlight control.
I essentially want the div to stretch to accommodate the size of the silverlight control. I do not know what size the silverlight control will be before it loads as it is pulling in data and adding controls dynamically. I want to avoid dueling scroll bars and use only the browser scroll bars.
I need this to work in both IE and Firefox.Is there a way to accomplish this?
View 2 Replies
Mar 31, 2010
When Bing map control loads for first time on any browser all pushpin on map are visible.
Bing map control renders perfectly.
Then I refresh browser it create rendering issue some custom pushpin on map gets disappeared. This behavior continues with pushpin. Pushpin are (.png) images and I am not using default bing map thumbtacks.
May be it is issue of browser caching content or Bing map control rendering issues on various browsers.
View 1 Replies
Apr 26, 2010
I'm developing a web site, and i'm using infragistics for web, but I want to use in some pages silverlight controls (Infragistics too). Is there a way to access a silverlight control's properties and methods from an aspx page?
View 3 Replies
Jul 27, 2010
On the following website, when I click the dropdown for the Login at the upper right, it is displayed behind the silverlight map. I can't use windowless mode because this would disable scrolling and menus on the map. I have tried putting the z-index everywhere, but I can't seem get it to work.
View 2 Replies