Adding Silverlight Control At Runtime?
Nov 1, 2010I 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 RepliesI 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 RepliesCan any body tell me how to add silverlight 3.0 control in master page in asp.net 3.5 (ide VS2008)?
View 2 RepliesThis is my first silverlight Application. I am trying to use Rating Control from 3.0 Toolkit with VisualStudio 2008 Here are the problems: I am unable to see designer view after adding Rating Control and few other controls. I am not getting any errors or warnings on markup or while compiling. Trying to access Property window for any control is giving me this message " Property Editing not available". Is this the way silverlight was made available with Visual Studio or is there something I am missing here?
View 1 RepliesI'd like to add a control A (that exists on a page) to a Footer user control's panel. If I create the control A dynamically and add it, I don't have issues. But I would like to avoid adding this dynamically.So, I defined control A in the aspx page and in the code behind, I got reference to the footer's panel and did a Controls.Add() It works fine, but postbacks from this control has strange behavior (could be due to viewstate?) as it doesn't execute some code that is on the page with a !IsPostback condition
View 1 RepliesI am converting a web forms site to MVC and there are a lot of pages all with an individual screenshot image on. Rather than have a separate page for each screenshot image, I though a better way to do this would be to have one page, and to pass the image details into a Controller method, and then set the src value of the <img> in my code. Does anybody know how to do this, and even if it is a good idea to be making reference to UI elements in my Controller code?
View 6 RepliesI need to have a siteMapeNode for a menu control to only show up during development.
The following node would be in the web.sitemap file.
[Code]....
I can either put this node in my web.sitemap file and remove it in release builds.
Or Add the node in debug builds.
Probably done in PreInit or Page_load events.
I have an MVC 2 web application which uses models auto-generated by LINQ. When I add a Silverlight project to my solution, generating a new strongly-typed View fails with the message:
Compiling transformation: The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?). I understand this is most likely because Silverlight does not access the System.Data namespace (at least, I can't add the reference to my Silverlight app). However, it's not really important - I'm just trying to generate an .aspx View at this stage, not a Silverlight View.
Is there any way to get this template generation to work, or do I have to create my Silverlight project outside the solution and build it separately? I was kind of hoping to take advtage of WCF RIA and some of the other goodies one gets from including the Silverlight app within the main solution... anybody got a fix?
I'm trying to add some user controls on a page. Thats easy, I just do it like this.
UserControl block = (categoryblock) LoadControl("categoryblock.ascx");
Panel1.Controls.Add(block);
But i want to access the label controls and more that are inside the categoryblock.ascx. How would i do that? I cant do it like this,
block.l_itemName.text = "blabla";
I managed to user FindControl("l_itemName") but i would rather like to have the intellisense.
I am showing data from different databases in a web part. Would it be possible to dynamically add and remove that data including the layout that that <DIV> has and would I go about in doing this?
View 3 RepliesCurrently a page loads usercontrol via
[Code]....
and Test.ascx has the following event
[Code]....
How can I add this part OnEvalCommand="Eval_Command" to the control at runtime. I am familiar with setting properties but not events.
Im using VS 2008 and have created a Visual C# ASP.Net Web Application and have a Table on the Page (Created at Design Time).
Im Trying to add rows at runtime when the user presses a button but it creates one row then none after.
[Code]....
I have have two radio button lists that need to be mutally exculisve, i.e when one is clicked the other one neesd to be cleared, my further problem is beause they are in a formview I had to add handlers to clear all the controls in the other list when the one is clicked and vice versa. here is the code below Now the code works but one of the testers found that if you click back and forth around twenty times you get the above java error:
Exception message: Maximum request length exceeded
my though here is the handler is being added to many times ? but even if I remove the handler after the process is complete I still get the same error.
[Code]....
to duplicate an already existing <div> with its existing controls multiple times on one form. I have a situation where I have a group of controls contained in one <div>, but the user might need to add more information in the same format so I would like to just have them click a button to add another component and the same set of controls will be duplicated below it.
View 6 RepliesIn my Page_Load() event, I'm calling a Sub (in a module UserMenu.vb) that reads an XML file which has the user menu entries. The final menu should be an <ul> with several <li>, some of them with anidated <ul> within. As I understand, I may use a asp:Panel in my page to position a container for this elements I read and in this sub I try to add them using new BulletedList and new ListElement BList.Items.Add(LItem)), but when I get to Panel.Controls.Add(BList) it throws an error that says BList should be inserted in a Form. Why? Aren't they just <ul> and <li>? What other alternative I have to create <ul> and <li> in a specific part of my page?
View 3 RepliesI am trying to add a radio button click event at runtime.
Radiobutton button = new RadioButton();
button.GroupName = "buttonGroup";
button.OnCheckedChanged = "buttonGroup_OnCheckedChanged"; //I can't do this?
I know I can do this from the markup, but when I try to do this from the code behine, I cant find OnCheckedChanged.
I am creating a web application that displays URL to users in a GridView. The application has a code behind that will be doing the processing before it can return me a URL. This is done in a loop. So it looks something like :
[Code]....
What I wanted is to make the Gridview always update the rows everytime an item in the loop is done instead of waiting for the loop to finish.
For now, the application will only display the whole table until the code/loop finishes. I'm very much aware that this will happen because the web page is static in the first place. Does anybody know how to do this?
I have tried of using iframes(I thought of reloading the frame so the whole page wont reload again and a new GridView table would appear because of the code in Page_Load event because I tried placing the data in a separate static class and the GridView.aspx page will just retrieve the values upon every reload)
and I'm not sure how to implement AJAX/Javascript with this. Is Animation involved in this kind of situations?
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.
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 RepliesI 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 RepliesI 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 RepliesWe 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.
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.
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 Repliesi 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
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