I have a visual basic web application and i placed a textbox on the form. When I look at the actions available for that textbox, the only actions available are DataBinding, Disposed, Init, Load, PreRender, TextChanged, and Unload. Why is KeyDown not available? Is it because this is a web application as opposed to a windows application? Is it possible to build an event handler that will fire the when a key is pressed? Maybe I have to convert my project to a windows application?
Yes, that is the reason. Remember that, in a web application, functionality is split between server and client. If you want to react to keystrokes then you need to do that on the client side, which means using JavaScript.
You are using Asp.Net Web Forms application. The very reason it exists is to help developers who previously worked on WinForms applications to move towards Web Development. This is why there are some similarities, e.g. WinControls <-> WebControls. But don't forget, you are in the WEB now. Your Button_onClick event works completely differently. If on WinForms this is invoked directly by button press; on the WebForms, your form is translated into HTML page with <form> and <input . . .> tags. And it builds javascript automatically, so when you press the button, there is a POST call to a server. Then, your server receives request, and directs execution to Button_onClick during so-called "page cycle".
Once you decide that your app needs to be a web app, you should probably forget doing it using Web Forms because this system is not true web development. A true web-centric development would be Javascript-based UI, may be using some framework like Vue or Angular with Asp.net Web Api as server app. May be you should start with Asp.net MVC. This will make you concentrate on single application, because server and client components are developed together when you use MVC.
Going back to main question - yes, 2 different systems, do not expect compatibility. And even when something seem similar, they might behave differently.
Why do you want to capture the keystroke?
You can control that the TextBox is entered by code, for example, that only numbers are entered;
asp:TextBox ID="TextBox3" runat="server" Width="50px"
AutoComplete="off" MaxLength="20" type="number" step="any"
TabIndex="9">
On Sitefinity 4.x or 5.x CMS, how do you add a RadEditor to a custom widget? I currently have a regular text field and it works fine, however I would like to provide more functionality to the edit text.
I have a working custom widget that includes a working custom designer. No problems, there, just wondering about the specifics in integrating the RadEditor.
in Sitefinity the RadEditor is wrapped in an HtmlField which can be emedded in a control designer to allow rich text input.
Here's some info on creating control designers: http://www.sitefinity.com/blogs/joshmorales/posts/11-09-20/creating_advanced_sitefinity_4_widget_control_designers.aspx
And a blog post that demonstrates a control designer using the HtmlField: http://www.avisra.com/blog/2011/05/22/sitefinity-control-designer-fields
hope this is helpful!
I had a look at http://www.westernaustralia.com/au/Pages/Welcome_to_Western_Australia.aspx and I know it's a SharePoint site and I am wondering how it could have been made.
I am mostly interrested in the center column (What's On). Is it an announcement list with thumbnails and Find out more links are pointing to wiki pages? Could it be a custom web part or is it possible to do this sort of thing with SharePoint 2010 out of the box?
Thanks in advance.
You can do this easily with a "What's New" web part. Customize your library view setting and set your webpart to use that view. Add a simple content editor at the bottom of this web part and add those other links like View All etc...
Remember that you can create your own list and make sure to index it so that it can rollback into the What's New webpart.
Looking at the emitted HTML it looks like a custom user control in the page layout to me (hell I could be wrong)
That said though it is possible to do this OOTB and I could build that functionality using the Content Query Web Part and some custom XSL
in this case , without using third party controls, load Html content in silverlight child window.(SL-4 InBrowser Application)
There is no built-in way in Silverlight 4 to do this in browser. The only way to do this in browser is to use javascript interop. You have to run the Silverlight app in Windowless mode, and create a div on the web page that is placed on top of the Silverlight application. You then have to move that div around based on the current coordinates of the Silverlight windows using javascript interop. This is not entirely trivial. Good luck.
Is there a way to prevent users from navigating directly to a page in Silverlight 4?
Thank you.
You can override the Page.OnNavigatingFrom method and cacel the navigation before it happens.