Search Results

Search found 879 results on 36 pages for 'programatically'.

Page 1/36 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • User control loosing its contents when loaded programatically

    - by Phil
    I have a usercontrol which contains 2 repeaters and the code to populate them with data. If i manually insert this into the page then it works correctly, the repeaters populate etc. If I load it programatically using this method; 1) add class name to user control ClassName="ContentModule" 2) reference this in the default.aspx <%@ Reference Control="~/modules/content.ascx" %> 3) Add the code to my codebehind page_load to do the loading; Private loadmodule As ASP.ContentModule Try If themodule = "content" Then loadmodule = CType(LoadControl("~\Modules\Content.ascx"), ASP.ContentModule) Modulecontainer.Controls.Add(loadmodule) End If Catch ex As Exception Response.Write(ex.ToString & "<br />") End Try Nothing from within the usercontrol is loaded to the page. Although if I add some static text i.e "TEST" to the top of the usercontrol this is displayed ok on the default.aspx page. This makes me think that the control is loaded ok, but there is something in the way I have loaded it that is causing the contents to not properly execute. Very frustrating this one! Any help greatly appreciated!

    Read the article

  • Rotate a feature programatically Open Layers

    - by Ozaki
    TLDR I want to rotate a Feature in my open layers. I want it to face a certain heading that I am receiving from server. I know that you can make a feature spin on a point or so on: window.setInterval(function() {rotateFeature( pointFeature, 360 / 20, origin)}, 100); as from the open layers example. But I want to be able to face it towards a heading I am given, so. Can I face a feature towards a heading? Can I face a feature(image) in the same way? If not is it possible to automatically calculate the rotation required and position it that way? Or any ideas on how I could do this with the image? (hoping not to have 360 images) Thanks in advance.

    Read the article

  • Loading user controls programatically into a placeholder (asp.net(vb))

    - by Phil
    In my .aspx page I have; <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" AspCompat="True" %> <%@ Register src="Modules/Content.ascx" tagname="Content" tagprefix="uc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:PlaceHolder ID="Modulecontainer" runat="server"></asp:PlaceHolder> </div> </form> </body> </html> In my aspx.vb I have; Try Dim loadmodule As Control loadmodule = Me.LoadControl("~/modules/content.ascx") Modulecontainer.Controls.Add(loadmodule) Catch ex As Exception Response.Write(ex.ToString & "<br />") End Try The result is an empty placeholder and no errors. Thanks a lot for any assistance

    Read the article

  • Loading user controls programatically into a placeholder (asp.net)

    - by Phil
    In my .aspx page I have; <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" AspCompat="True" %> <%@ Register src="Modules/Content.ascx" tagname="Content" tagprefix="uc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:PlaceHolder ID="Modulecontainer" runat="server"></asp:PlaceHolder> </div> </form> </body> </html> In my aspx.vb I have; Try Dim loadmodule As UserControl loadmodule = Me.LoadControl("~/modules/content.ascx") Modulecontainer.Controls.Add(loadmodule) Catch ex As Exception Response.Write(ex.ToString & "<br />") End Try The result is an empty placeholder and no errors. Thanks a lot for any assistance P.S after Fat_Tony's answer I changed the code to; Try Dim loadmodule As ASP.ContentModule loadmodule = CType(LoadControl("~\Modules\Content.ascx"), ASP.ContentModule) Modulecontainer.Controls.Add(loadmodule) Catch ex As Exception Response.Write(ex.ToString & "<br />") End Try But still no results unfortunately.

    Read the article

  • How to create sprites, programatically without using prefabs?

    - by DemonSOCKET
    I have different types of images for different sprites. and i am not certain that how much different sprites(images) i will have to show. So, i gotta create the sprites and apply textures programatically at runtime. Now, I defiantly can't use prefabs because it will restrict me with the number of different sprites i can use. and also, changing texture on one sprite prefab instance in game, will change all the sprites prefab, that's not acceptable in my case. Is there a way i can create sprites without having to create static prefab ? where ever i looked for the solution every time i got the same answer "create a prefab", which is what can not be done in my case.

    Read the article

  • Programatically clicking a HTML button by vb.net [closed]

    - by Chauhdry King
    I have to click a HTML button programatically which is on the 3rd page of the website. The button is without id. It has just name type and value. The HTML code of the button is given below <FORM NAME='form1' METHOD='post' action='/dflogin.php'> <INPUT TYPE='hidden' NAME='txtId' value='E712050-15'><INPUT TYPE='hidden' NAME='txtassId' value='1'><INPUT TYPE='hidden' NAME='txtPsw' value='HH29'><INPUT TYPE='hidden' NAME='txtLog' value='0'><h6 align='right'><INPUT TYPE='SUBMIT' NAME='btnSub' value='Next' style='background-color:#009900; color:#fff;'></h6></FORM> I am using the following code to click it Dim i As Integer Dim allButtons As HtmlElementCollection allButtons = WebBrowser1.Document.GetElementsByTagName("input") i = 0 For Each webpageelement As HtmlElement In allButtons i += 1 If i = 5 Then webpageelement.InvokeMember("click") End If Next But I am not able to click it. I am using the vb.net 2008 platform. Can anyone tell me the solution to click it?

    Read the article

  • Adding Suggestions to the SharePoint 2010 Search Programatically

    - by Ricardo Peres
    There are numerous pages that show how to do this with PowerShell, but I found none on how to do it with plain old C#, so here it goes! To abbreviate, I wanted to have SharePoint suggest the site collection user’s names after the first letters are filled in a search site’s search box. Here’s how I did it: 1: //get the Search Service Application (replace with your own name) 2: SearchServiceApplication searchApp = farm.Services.GetValue<SearchQueryAndSiteSettingsService>().Applications.GetValue<SearchServiceApplication>("Search Service Application") as SearchServiceApplication; 3: 4: Ranking ranking = new Ranking(searchApp); 5:  6: //replace EN-US with your language of choice 7: LanguageResourcePhraseList suggestions = ranking.LanguageResources["EN-US"].QuerySuggestionsAlwaysSuggestList; 8:  9: foreach (SPUser user in rootWeb.Users) 10: { 11: suggestions.AddPhrase(user.Name, String.Empty); 12: } 13:  14: //get the job that processes suggestions and run it 15: SPJobDefinition job = SPFarm.Local.Services.OfType<SearchService>().SelectMany(x => x.JobDefinitions).Where(x => x.Name == "Prepare query suggestions").Single(); 16: job.RunNow(); You may do this, for example, on a feature. Of course, feel free to change users for something else, all suggestions are treated as pure text.

    Read the article

  • Programatically loading user controls

    - by PhilSando
    Today's little problem is that I am trying to load user controls from my codebehind like so: Dim myControl As UserControl = Page.LoadControl("~\Modules\Content.ascx")              Controls.Add(myControl)  On running the page myControl is no where to be seen. I wonder why that is? Well after a bit of thought the following come to mind... Am I using the correct code to insert the usercontrol? Is there an alternative available? Does the fact that the usercontrol has a page_load method make a difference? Does the fact that the usercontrol is being called from the page_init method make a difference? Do I need to register the control in my aspx page at design time? I'll be looking to answer these questions as the day goes on!

    Read the article

  • Programatically create a table using c#

    - by Samir R. Bhogayta
    Table tbl = new Table();         tbl.ID = "table1";         this.Controls.Add(tbl);         for (int row = 0; row < 5; row++)         {             TableRow rw = new TableRow();             TableCell cell = new TableCell();             Label text = new Label();             text.Text = "text";             cell.Controls.Add(text);             rw.Cells.Add(cell);             tbl.Controls.Add(rw);         }

    Read the article

  • Adding configChanges ="locale" programatically

    - by chrisonline
    I use configChanges="locale" on my activities. Without this options in AndroidManifest.xml in 2.x i get flickering screens. It works in all my activities excepting in the preferences screen i add programatically. I have one Preference Activity -- it works after setting configChanges="locale" to the AndroidManifest.xml. Inside of the Preference Activity i add programatically a new preferencescreen. For this new PreferenceScreen i dont have an activity in the AndroidManifest.xml! So i cannot add the configChanges="locale" and the screen flickers on 2.x !! How can i add the attribute configChanges="locale" programatically?

    Read the article

  • How to add UITabViewController programatically?

    - by chaitanya
    Hi, In my app I need to add tabviewcontroller to my 2nd view, If its a main view directly we can take the TabViewController type while creating the project but my requirement is i have one view controller in my app, from this view i shold call tabviewcontroller, So how can I tab view controller programatically and how to add nibs to that and how to define the no of tabs for this programatically?

    Read the article

  • Programatically Dial a Phone number and pass DTMF using the iPhone SDK

    - by L. DPenha
    How do you programatically do the following from the iPhone SDK 1) Programatically Dial a Phone Number through the iPhone SDK 2) Bypass the dial / cancel prompt that the iPhone brings up 3) Send additional DTMF after the number is dialed just like how you would program pauses into a regular phone. I know you can make a tel:// call but the issue is that it brings up the dial / cancel prompt and after that it prevents any future DTMF from being sent.

    Read the article

  • Adding posts with thumbnail programatically in WordPress

    - by rebellion
    I know I can use the wp_insert_post() function in WordPress to add posts programatically, but I want to add posts with a thumbnail, and for that matter, also resize/crop the post photo to the correct WordPress sizes. Is all this possible programatically, or do I need to do some work manually (i.e. the resizing/cropping)?

    Read the article

  • Page Lifecycle - Using FindControl to reference a control created programatically during page load

    - by Jay Wilde
    Hi, I'm creating some text boxes on my form programatically which I need to reference later using FindControl. I've put the FindControl instruction in the page load method after the code which creates them but get an error: "Object reference not set to an instance of an object." I assume this is because the textbox controls are not created until later in the lifecycle and therefore cannot be referenced from within Page_Load. Can someone advise where in my code-behind I would need to place the FindControl instruction so that it can find these programatically created text boxes?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >