Adding User Controls To Web Page in VB.Net Web App - c#

I have followed the setup instructions at this link Adding Controls to a webpage
However, for the 2 weeks that I have been studying vb.net, I have yet to be able to add a drag and drop form or control element on the page as all options are grayed out...even while in design view. Is there a setting I am overlooking? It doesn't make any sense that there would be tutorials on how to do the exact thing I am trying to do, but for some reason, it does not allow me to do it on my setup. Please help!?

Ok...rookie mistake. I figured it out. I was still running and debugging the application. Must stop the application from running and then all form controls become "addable".
Hope this saves someone time.

Related

ASP.NET WebForms and jQuery Validation - validate() undefined

I thought the entire purpose of jQuery was to make a developer's life easier but ever since I started learning how to use it ~3 months ago it has caused nothing but nightmares for me!
I'm now working on an ASP.NET WebForms app and am trying to use jQuery Validation since the built-in validator controls can't be easily rendered below their input counterparts. That is all I want to do; have an input with an error message that dynamically appears and disappears underneath it, but I've been banging my head against a brick wall for 5 hours trying to figure out how to do one, seemingly-incredibly-simple little thing!
I started off with a bunch of <asp:RegularExpressionValidator> and <asp:RequiredFieldValidator> controls (since you can't do both validations with one control) but didn't like how the error messages displayed inline, to the right of my inputs. So I spent ~2.5 hours trying to make ASP.NET render the damn things with display: block;, to no avail.
That's when I remembered a colleague having mentioned the jQuery Validation plugin to me about a month ago...so off I went trying to implement a solution with that. But no matter what I try, Google Chrome v.41 on Windows keeps giving me an "undefined is not a function" error on the jQuery.validate() function.
I know what you're thinking: something along the lines of "ASP.NET mangles control IDs...yada yada yada", but I've been using <pages clientIDMode="Static" /> in my web.config's <system.web> section ever since I started this project, so that's not the issue. I'm also 99.999% sure that I'm including the necessary scripts in the correct order, even though some are included in my master page and some in the content page (this shouldn't matter, should it?)
This post is already way too long, so check out the full code here.
MTIA to anyone who can tell me what the hell is going on here!
I debugged your code. The problem is with your comments. Remove your comments from the code, and it will work :)

Taking a Screen shot of WebPage using Windows Application

I want to take a screen shot of list of websites and save them
i have got and completed the code which i have got it from here in StackFlow from LB
that exact code does awesome job.
I am able to get the full Page.but there is a problem in that
I want to take images of these and many such websites.they load really late(or load only when you scroll to those areas of the page)
they take long time to load and some times they load only when you scroll to that area of page.
I ma using default webrowser of .net
so if i take a screenshot it will take before the page is completely loaded.
checking the PageComplete event is not helping in this case. As it is showing completed event thought the images are still in loading stage.
Sleep is also not helping.
Cant use third party tools. so please help me. i saw many links for that and cant use or pay for them
does any one has any idea?? Please help.
You can use a third party library called Selenium to wait for specific elements in the DOM to load before taking your screenshot. This library is normally used for automated testing of webpage user interfaces. More details can be found here.
Selenium is capable of working with different browser types (you did not specify which browser you are working with in your question), so you will need to do some further research based on this. Searching for something along the lines of "Selenium element visibility" with your browser type will lead you to the required functions.

Webusercontrol objects not working

I am using some web user controls on a website I am creating, but the problem is that sometimes visual studio cant load the control because he (my guess) needs a namespace imported where the web user control is located in. To make things more clear here's the line of code I am reusing to make objects of the web user control.
Criterialijn criterialijn = (Criterialijn)LoadControl("~/Criterialijn.ascx");
When I first execute this, he does not know about what object I am talking about, but when I drag and drop the .ascx control into the app_code folder and drag and drop it back out, everything is fine : he lets me load the web user controls and knows about what object I am talking about. Now this is a kind of retarded solution so my question is how do I fix the web user control so that he immediately knows about what object I am talking about when I create it?
This is how I do using a placeholder. Hope it helps.
Criterialijn criterialijn = (Criterialijn)LoadControl("~/Criterialijn.ascx");
PlaceHolder1.Controls.Add(criterialijn);

Windows Forms Browser Skeleton (C#/.NET)

I was wondering if anyone knows of an existing sample or an approach to achieve the desired functionality.
Basically, what I'm looking for is a web browser like skeleton. The idea is that the main screen of my application is shown in the left tab. This tab can never be closed. On this screen is an overview of various application components such as activities, events, contacts, etc.
When the user clicks on a specific contact/event/activity a new tab is created and auto-focused. The user can view and edit the information. When they are done they can close the tab.
The ability to have multiple tabs open is important.
Also, keyboard shortcuts to easily navigate between tabs would be great, but not absolutely essential at this point.
Note: I don't need to access any web content.
Really what I'm looking for, at least what I think I'm looking for, is a shell of a modern web browser. Does something like this exist? Is there a good approach to building such an application?
Note: I'm new to Windows GUI development, so I apologize if this is a rudimentary question. I was unable to find anything meaningful while searching MSDN and other resources.
Thanks!
What it sounds like is not really a Web Browser shell at all, simply the relative appearance of one functionality-wise.
What you can do is use a TabControl control. This can be altered to suit your needs quite perfectly in my view.
An example of a modified TabControl is as follows: [ From here ]
There are a number of things that can be done with a TabControl (as with any other component) to make it suit what you need.
Here are some links that you may find helpful:
Flat Tab Control - As per the picture
MSDN
Video on using a Tab Control
C# Corner

Silverlight: Auto scrolling page when tabbing to different textbox

I am using silverlight 2.0 with C# for my application.
Few of the pages are quite long and contain quite a few of textboxes. The question I have is:
I use 'tab' to move between the textboxes on the page. When I tab into a TB that is not shown on the page - how can I make it so that the pages autoscroll to display which field I am on the page?
Right now I have to manually scroll the page. I have tried couple of things and would like to know if there is an easier more efficient way to accomplish this.
Thanks in advance!
Here is a behavior that looks good for the "scroll into view" issue. I haven't tried it myself though, so I cannot vouch for the quality (and I don't know if it works in Silverlight 2):
Silverlight BringIntoView() extension method (with OnGotFocus behavior)
And I very much recommend migrating to Silverlight 3 (and later this year, 4) if you are planning on doing more work on the application. It is hard to say how difficult it will be for you, especially since you are new to Silverlight. That depends on the nature of your application. I can only say that when we migrated from 2 to 3 it was not that difficult, and we have a big application with a lot of strange hacks. I was expecting a world of pain, but it was done in a couple of days. Oh, and you can get the Telerik components for version 3 as well.
I would suggest that you try compiling the app in Silverlight 3 with the upgraded Telerik components and see how many build errors you get. Then you will probably have a pretty clear indication of whether it's worth it or not.

Categories

Resources