Archive for 'VB.NET'
Enter button in TextBox ASP.NET
This article is demonstrating how to wire up an enter key into a textbox. For example you have a search text box where you press enter then it will click go button and at the same page you have another textbox where you want to do another button click when you press the enter which [...]
Posted: August 17th, 2010 under ASP.NET, Javascript, VB.NET.
Tags: ASP.NET, Javascript, Keypress, VB.NET
Comments: none
ASP.NET Calendar selected day on click method
I’ve a case where I have an ASP.NET calendar that has a page load method that automatically select a date when it’s loaded. I also have an event defined for Selected_Changed which will be triggered only when the user select any other date other than pre-selected date on the load
Private Sub ctlCalendar_SelectionChanged(ByVal sender As Object, [...]
Posted: August 17th, 2010 under ASP.NET, Javascript, VB.NET.
Tags: ASP.NET, Calendar, Calendar javascript, Calendar Selected Date
Comments: none
Telerik SL Gridview Cell Foreground color dynamically based on multiple binding
I had a problem before where I build dynamic system (light dataset) for doing CRUD (Create, Read, Update and Delete) and I need to store the history of previous record before Update/Delete and at the same time I also need to indicate the column(e.g changing the color of the column) that has been changed per [...]
Posted: July 6th, 2010 under .NET, Silverlight, VB.NET.
Tags: Cell Converter, ItemDatabound, RadGridView Silverlight, Silverlight, Telerik
Comments: none
Reflection GetProperty case sensitive issue
Reflection on .NET by default is case sensitive for the class member. To make it case insensitive you need to pass BindingFlags.IgnoreCase . I’ve passed the ignorecase flag and now it doesn’t return anything!!!
Dim pi As PropertyInfo = Me.[GetType]().GetProperty(fieldname, BindingFlags.IgnoreCase)
Basically, if you pass one flag then the other flags will be overwritten by [...]
Posted: June 28th, 2010 under .NET, ASP.NET, C#, VB.NET.
Tags: Case Sensitive, GetProperty, Reflection
Comments: none
Compression in Silverlight Isolated Storage
Isolated storage in silverlight is used to store information or object therefore we don’t need to go to database to get all the information over and over again but again to use isolated storage or not should be based on case by case. Based on the implementation of the code below, I’ve found that it [...]
Posted: December 4th, 2009 under .NET, ASP.NET, VB.NET.
Tags: Isolated Storage, Silverlight
Comments: none
FormsAuthentication.GetRedirectUrl only get the first parameter of querystring
I found the issue with FormsAuthentication.GetRedirectUrl when it redirects then it redirects with the first querystring that you have while in fact you might have more than one querystring
e.g http://localhost/myweb/login.aspx?returnurl=myview.aspx?viewID=123&viewname=abc&viewall=false then the standard FormsAuthentication will redirect to http://localhost/myweb/myview.aspx?viewID=123
but where’s the remaining viewname querystring and viewall querystring??to fix this, just use the code below to pick [...]
Posted: August 7th, 2009 under .NET, ASP.NET, VB.NET.
Tags: ASP.NET, Forms Authentication
Comments: none
an activex control on this page might be unsafe to interact with other parts of the page. do you want to allow this interaction?
I keep getting this message “an activex control on this page might be unsafe to interact with other parts of the page. do you want to allow this interaction” when I try to access a page that use Javascript to access ActiveX Code. I’ve spent quite sometime to get rid of this error message and [...]
Posted: July 3rd, 2009 under .NET, C#, Javascript, VB.NET.
Comments: none
Upload Multiple Files to FTP in .NET
I’ve played around with FTP couple of weeks back. My application is required to feed FTP folder with 1000+ files daily. I’ve been googling around and I found one of the methods is to use WebApplication so I decided to put this WebApplication method to upload while iterating every single files in the directory. After 5 files, [...]
Posted: May 24th, 2009 under .NET, ASP.NET, C#, VB.NET.
Tags: Asynchronous Upload, The remote server returned an error: (503) Bad sequence of commands, Upload Files to FTP
Comments: none
the server committed a protocol violation section= responsestatusline
I’ve got this error and try to spend almost an hour to resolve this:
“the server committed a protocol violation section= responsestatusline” when I tried to get the response back from the payment gateway. It happens when you send HTTP Request one after another on the same page. The solution is to add unsafeheaderparsing [...]
Posted: September 1st, 2008 under .NET, ASP.NET, VB.NET.
Tags: ASP.NET, XML
Comments: none
Invalid postback or call argument
It’s quite often I have this error because of the content has been changed during postback or because of the control id. I’ve read most of the article suggested to disable the event validation by putting this on the page which is loosen up the security of that particular page. I found the other [...]
Posted: September 1st, 2008 under ASP.NET, C#, VB.NET.
Tags: ASP.NET
Comments: none