Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. misc asp.net questions [modified]

misc asp.net questions [modified]

Scheduled Pinned Locked Moved ASP.NET
csharpquestionjavascriptasp-net
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    algoaddict
    wrote on last edited by
    #1

    1/ i want to display a youtube video or other content on a specific part of the page,and when its finished, display content from another source on the same place. im not sure how and in what control i should display the contect so i can get this ability. for example, if it was only text, i would do it with a label, changing its "text" property. i need the same ability but with other types of contents, primevally and content. do i need an update panel or the content source be changed with client side javascript only ? 2/ whats the process for creating "widgets" ? in widgets i mean all those objects like youtube videos, meebo and other that can be published on webpages only by adding an "" tag to the page ? articles or tutorials ? 3/ whats the keyword "Or" is doing in vb.net ? what that line means ? "x Or y Or z" in vb.net ? how do i translated it to c# ? 4/ how do i plant a vb.net code in the middle of c# code in a .cs file ? is it possible ? i think i saw somthing about it.. thats it, i hope its not to much and all the questions are clear.. -- modified at 13:42 Wednesday 15th August, 2007

    J 1 Reply Last reply
    0
    • A algoaddict

      1/ i want to display a youtube video or other content on a specific part of the page,and when its finished, display content from another source on the same place. im not sure how and in what control i should display the contect so i can get this ability. for example, if it was only text, i would do it with a label, changing its "text" property. i need the same ability but with other types of contents, primevally and content. do i need an update panel or the content source be changed with client side javascript only ? 2/ whats the process for creating "widgets" ? in widgets i mean all those objects like youtube videos, meebo and other that can be published on webpages only by adding an "" tag to the page ? articles or tutorials ? 3/ whats the keyword "Or" is doing in vb.net ? what that line means ? "x Or y Or z" in vb.net ? how do i translated it to c# ? 4/ how do i plant a vb.net code in the middle of c# code in a .cs file ? is it possible ? i think i saw somthing about it.. thats it, i hope its not to much and all the questions are clear.. -- modified at 13:42 Wednesday 15th August, 2007

      J Offline
      J Offline
      Jpuckett
      wrote on last edited by
      #2

      1. content goes here in the codebhind we set the visibility CODEBEHIND: if contained within a repeater or someother control: Page.FindControl("phSomething"); otherwise just: protected void Page_Load(object sender, EventArgs e) { phSomething.Visible = true; } protected void On_Some_Event(object sender, EventArgs e) { phSomething.Visible = false; } Something to remember, the PlaceHolder control does not remember the contents of it between postbacks. So if it is needed to retain information across post backs, you can set all data to a session variable or cookie, or host the placeholder inside an AJAX Update panel and post back Asynchrously. 2. This isn't ASP.NET particularly... However you can set the "MinMaxClose" toolbar to not visible and that should help make it more difficult. I'm not a WinForms expert ;) 3. The process of widgets in ASP.NET (this is an ASP.NET forum) is more or less using XML web services to pass data or "consume" a webservice. I dont exactly know what all you mean here, the tag dates back to HTML 3.0 or even earlier... It's more or less a Web Standard nowadays. 4. OR is a keyword that is used in conditional statements. Let's say that we want to make an if statement: If(Algoaddict_Posts_ASPNET_Forums OR Algoaddict_Posts_Anywhere_Forums) Algoaddict_Answered = true EndIf In C#: if(Algoaddict_Posts_ASPNET_Forums | Algoaddict_Posts_ASPNET_Forums) { Algoaddict_Answered = true; } In this case, OR returns a boolean true if either case returns true. Thus, you were answered. :) For more information, you can see MSDN Documentation on CONDITIONAL STATEMENTS and BOOLEAN OPERATORS. --EDIT Darn! You modified the questions! 4. Not really possible, no. However, you can create a vb class and call that class from inside a CS file.

      A 1 Reply Last reply
      0
      • J Jpuckett

        1. content goes here in the codebhind we set the visibility CODEBEHIND: if contained within a repeater or someother control: Page.FindControl("phSomething"); otherwise just: protected void Page_Load(object sender, EventArgs e) { phSomething.Visible = true; } protected void On_Some_Event(object sender, EventArgs e) { phSomething.Visible = false; } Something to remember, the PlaceHolder control does not remember the contents of it between postbacks. So if it is needed to retain information across post backs, you can set all data to a session variable or cookie, or host the placeholder inside an AJAX Update panel and post back Asynchrously. 2. This isn't ASP.NET particularly... However you can set the "MinMaxClose" toolbar to not visible and that should help make it more difficult. I'm not a WinForms expert ;) 3. The process of widgets in ASP.NET (this is an ASP.NET forum) is more or less using XML web services to pass data or "consume" a webservice. I dont exactly know what all you mean here, the tag dates back to HTML 3.0 or even earlier... It's more or less a Web Standard nowadays. 4. OR is a keyword that is used in conditional statements. Let's say that we want to make an if statement: If(Algoaddict_Posts_ASPNET_Forums OR Algoaddict_Posts_Anywhere_Forums) Algoaddict_Answered = true EndIf In C#: if(Algoaddict_Posts_ASPNET_Forums | Algoaddict_Posts_ASPNET_Forums) { Algoaddict_Answered = true; } In this case, OR returns a boolean true if either case returns true. Thus, you were answered. :) For more information, you can see MSDN Documentation on CONDITIONAL STATEMENTS and BOOLEAN OPERATORS. --EDIT Darn! You modified the questions! 4. Not really possible, no. However, you can create a vb class and call that class from inside a CS file.

        A Offline
        A Offline
        algoaddict
        wrote on last edited by
        #3

        thanx a lot ! 1/ what happens if i want to set the content of the window in run time ? i cant use the approach of creating all the windows and only hiding and displaying them as you suggested. an i frame would do the work, is it still being used in asp.net 2.0 after ajax arrived with all its features ? or theres an ajax replacement ? cant this be achived with updatepanel ? 4/ about the Or - i know the original usage of it and how it can be converted to c# but in this specific case, visual studio says its an integer, and its not between boolean variant - this is the exact code: "SetWindowLong(Me.Handle, GWL.ExStyle, m_InitialStyle Or WS_EX.Layered Or WS_EX.Transparent)" when the last parameter should be of type "Window_Library.WindowLibrary.User32Wrappers.WS_EX()" furthermore, i tried copying the exact code and replace "Or"s with "|" and get the following error message: Error 1 Operator '|' cannot be applied to operands of type 'int' and 'Window_Library.WindowLibrary.User32Wrappers.WS_EX' thanx again

        J 1 Reply Last reply
        0
        • A algoaddict

          thanx a lot ! 1/ what happens if i want to set the content of the window in run time ? i cant use the approach of creating all the windows and only hiding and displaying them as you suggested. an i frame would do the work, is it still being used in asp.net 2.0 after ajax arrived with all its features ? or theres an ajax replacement ? cant this be achived with updatepanel ? 4/ about the Or - i know the original usage of it and how it can be converted to c# but in this specific case, visual studio says its an integer, and its not between boolean variant - this is the exact code: "SetWindowLong(Me.Handle, GWL.ExStyle, m_InitialStyle Or WS_EX.Layered Or WS_EX.Transparent)" when the last parameter should be of type "Window_Library.WindowLibrary.User32Wrappers.WS_EX()" furthermore, i tried copying the exact code and replace "Or"s with "|" and get the following error message: Error 1 Operator '|' cannot be applied to operands of type 'int' and 'Window_Library.WindowLibrary.User32Wrappers.WS_EX' thanx again

          J Offline
          J Offline
          Jpuckett
          wrote on last edited by
          #4

          I latebind my content all the time. That's an easy one. protected void OnDataBind_Control_to_Show(object sender, EventArgs e) { SetCorrectView(); } protected void SetCorrectView() { Series of if statements that check for control.txt or control.value = "" or null } If the control has data, show it. otherwise dont. Easy peasy. In that case, I can see howit's being used, and the reason VS shows it as an integer, is that all three possible arguments sent to the function must be integers. So, in your case, the last argument can take any of those three specific arguments, but they must all be ints.

          A 1 Reply Last reply
          0
          • J Jpuckett

            I latebind my content all the time. That's an easy one. protected void OnDataBind_Control_to_Show(object sender, EventArgs e) { SetCorrectView(); } protected void SetCorrectView() { Series of if statements that check for control.txt or control.value = "" or null } If the control has data, show it. otherwise dont. Easy peasy. In that case, I can see howit's being used, and the reason VS shows it as an integer, is that all three possible arguments sent to the function must be integers. So, in your case, the last argument can take any of those three specific arguments, but they must all be ints.

            A Offline
            A Offline
            algoaddict
            wrote on last edited by
            #5

            i downloaded this: http://www.codeproject.com/csharp/winformiehost.asp and its working on my vista home basic, but not on xp sp2. the build runs ok in visual studio but the app crashes with this errro message: System.Security.SecurityException was unhandled Message="Request failed." Source="SampleEventProgram" StackTrace: at SampleEventProgram.Form1..ctor() at SampleEventProgram.Form1.Main() does anyone have a clue ? i worked a whole day making this work in c# (i managed doing it using csharper conversion) but it doesnt work on xp wich is much more important for me... this is the error code windows is giving EventType : clr20r3 P1 : sampleeventprogram.exe P2 : 1.0.2784.1621 P3 : 46c3840a P4 : sampleeventprogram P5 : 1.0.2784.1621 P6 : 46c3840a P7 : 8 P8 : 0 P9 : system.security.security thanx again -- modified at 18:55 Wednesday 15th August, 2007

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups