vb.net

Using Global.asax to catch missing PDFs

I'm trying to use the Global.asax file in the root application of the website to catch requests for pdf files in the root that don't exist any more. I've configured iis to send pdf requests to asp.net. The whole thing works perfectly on development. It also works on the live system with missing .aspx pages, but not .pdf. Instead an "Erro...

VB.NET - For Each in WPF-Controls

Hey people, I want to check some childelements in my WPF-Form. In WindowsForms that was quite easy with (like): For Each control as Textbox in Me control.text = "hello people" Next How do I do that in WPF within my XAML.VB-File? I got a listbox with some childelements here which I want to analyse. Greetz and thanks for your ideas! ...

select item from dropdown list on webpage

I need my app to select an item from the dropdown list on a webpage. Here is the html <select class="Data_Entry_List_Box_Loca" onclick="clearSuggestion()" onchange="updateDropDownList(this.form, true)" id="xxx_c_1_f_163" name="xxx_c_1_f_163"> <option value="-1">Please Select</option><option value="1785" selected="selected">Alberta</op...

Using a single DataSource on Multiple .NET Forms

My program has two forms which get data from the same data source. After binding controls to tables and fields on both forms, I noticed each form has it's own apparently duplicate DataSet. Is it standard practice for each form to have its own DataSet even though they use the same ConnectionString and connect to the same database at the...

What controls the image quality in IIS based on the following example?

I had this question before "Resize image on the fly make the image lose quality online but locally works nice" And what i got now is that it's not a problem of local or online, i ran this resize on the server itself "dedicated server", and i got the same bad quality image, so the problem is in the IIS configurations. What in iis can ma...

Using certificates in a client-application consuming a web service

I am implementing a VB.NET desktop application which consumes a web service. The web service implemented in Java and I currently using Tomcat on my localhost to host the web service. The web service requires secure communication with the client and so I have followed instructions that outlined how to use Java's keytool.exe to create tw...

LINQ Generating Bad Query, Error Unknown Column (VB.NET MySQL)

I'm developing in MVC2 using VB.NET and MySQL and ran into a problem trying to convert a simple SQL query to LINQ. SQL Query: SELECT Location_Number, sum(Column1) as totalC1, sum(Column2) as totalC2 FROM MyTable WHERE year = 2010 and month = 8 GROUP BY Location_Number ORDER BY Location_Number LINQ Query: From r In MyTable _ Where...

ASP.net: Gridview Datasource Caching Question

I currently have a control that called MyGridview that inherits Gridview. It has a paging template within it for customized paging options, and I'm at the point where I want to cache the initial datasource for better performance. I haven't done this in a long time, so perhaps there is a different solution these days with the newer fram...

simple vb.net database program

Over 6 years ago I did visual basic programming. I used VB6 for an editor. I did it for a semester in college, and I didnt make a good grade. Since then I have been doing other things in life. However I was asked at work to create a web application. I am creating my application in vb.net 2003. I began desigining the interface of the web ...

vb.net aspx How do I set a select back to the default select after it's been changed?

I need to set a select back to it's default value after it's been changed based on certain conditions. Any ideas? ...

Skip updating SQL row with empty values?

I have a table with several columns that allow NULLs. How would I go about writing a SQL Query that will allow me to skip that column in an update if the value is "empty". Should I use a boolean flag letting the query know to update that value? I do something similar in a SELECT like this SELECT * FROM table WHERE (@boolFlag = 1 OR col1...

Accessing control attributes from static function

Here's what I've got: <textarea id="TextArea1" rows="6" cols="20" runat="server"></textarea> and in the code-behind: partial class _Default : System.Web.UI.Page { [Webmethod()] public static void Data(int TestNum) { if (TestNum > 0) TextArea1.InnerText = "hello world"; } } And I'm getting the following error...

Replacement Problem in VB.NET

I have a replacement problem in VB.NET: I need to replace the " character: result = result.Replace(""", "") How can I make this work? Is is even possible? ...

System.ServiceModel.FaultException SQL Error, is it on their end?

So upon a method call to a webservice, I'm getting this error: "System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that ...

WebBrowser ShowPrintPreviewDialog() very small

I'm using a WebBrowser to print some HTML data, all works good except for the print preview called in the load completed event - It opens as a very small window in the top left, anything I can do to improve this? Private Sub BtnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnPrint.Click Dim webBrow...

How do you open a WPF window in its own thread, then close it?

I am trying to give some user entertainment, and show a "please wait" window, with Marquee, during the loading of a separate complex Window. I am attempting to do this by loading the Window in a new thread, like this: Public Function ShowPleaseWait() As System.Threading.Thread Dim PleaseWait As New System.Threading.Thread(...

download a file using webservice in vb.net

i have a website and i want to download a file from another folder on the same server. I want to use webservice, which i am not very familiar with. How can i download that file by pressing a button on my website, using webservice? does anyone knwo how this is done? ...

ASP.Net GridView doesn't refresh

I am relativity new to asp.net programming, so this one has me stumped. I manually created a dataset and set its value to the Datasource of the GridView control and then call the Databind method, but it isn't refreshing. I recreated a simple version of what I am doing so someone can advise me what I am doing wrong. I didn't include the M...

Question about WinForms development environment in the workplace

I'm from an AS/400 (iSeries) background and have no idea about how a team of programmers work within the .Net environment. Lets say a company purchases a new button control. Now, in that company they'll have 5 or 10 developers working with that new control. Its my understanding that even if the control is in the GAC, it must still be co...

Trimexcess on List(Of t) in .net

After filling a list with the the needed strings, if the list won't be further appended, should trimexcess be called? ...