.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Help with vb-based aspx file from scratch

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :ASP.Net

Hey, newbie here.

I am making a website from scratch. I know nothing about asp.net, but I want to learn to use it for it's database interoperability. So far, everything I've done has been basic html.

I have SOME experience with VB. I decided to make an aspx  page alone from scratch that was vb based, and all I'd done so far was create a form  in web developer 2010 express.

My html page is cut up into frames, and i tried src'ing one of them to the aspx page. But when I run the frames.html page, the part that's supposed to show the aspx page is showin me this:

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

A name was started with an invalid character. Error processing resource 'file:///C:/Users/xxxxxxx/Desktop/xxxxxx/NewCa...

<%@ Page Language="VB" %>


I don't know what this means. This was the html code given to me when I created the aspx page. So why doesn't it understand it?

Another thing I couldn't find was the vb code page for the aspx while I was working on it IN web develope

View Complete Post

More Related Resource Links

Launch CMD File From ASPX Page


My organization uses a CMD file to install updated files for a major enterprise application. Currently, we send out an email to users with a link to the file and instructions to run it, BUT inevitably users don't update their machines until their in field and try to start the app.


We're now liking the idea of using an ASPX page to prompt the users to run the updates and to capture the fact that the updates have been run. I realize that we can't capture the success or failure of the update. But we'd like to capture the user accessed the page.


Is it possible to embed into the markup for the page a link to the file on the local intranet that the users can click on to run the file?

The user accessing the page would capture that they did just that. We'd deal with wether or not the update was actually installed or if it failed later with them directly.

Code Name WinFS: Revolutionary File Storage System Lets Users Search and Manage Files Based on Conte


One of the monumental problems organizations face today is aggregating information that's stored in disparate formats. Knowledge workers have long wanted to be able to search for content independent of format. The next version of the Windows operating system, code-named "Longhorn," boasts a new storage subsystem that makes that task easier. That subsystem, code-named "WinFS," allows the user to perform searches based on the metadata of the stored item, regardless of what type of file it is or which application created it. This article covers the basic architecture of WinFS and explains how to use the WinFS managed API.

Richard Grimes

MSDN Magazine January 2004

ISAPI Extensions: Creating a DLL to Enable HTTP-based File Uploads with IIS


The MIME-compliant content type, called multipart/form-data, makes writing HTML that uploads files almost trivial. On the server side though, ASP does not have a way to access data in the multipart/form-data format. The most flexible way to access the uploaded file is through a C++ ISAPI Extension DLL. This article describes a reusable ISAPI extension DLL that allows you to upload images and files without writing C++ code. It is coupled with a few COM components that make it readily reusable for ASP development. With .NET, this whole process is much easier, and this article shows preliminary code that uploads files using ASP.NET features.

Panos Kougiouris

MSDN Magazine October 2001

>>>How to use javascript function in aspx file?



I have a file util.js and there some funtions in same file.

For example functions name are keyUp, keyDown, isNumeric, isAlphaNumeric

I have used these functions in aspx code behind in a textbox to restrict user that he may not be able to input any special character.

Before, I used the code directly in aspx file but I have do it for different textboxes therefore to avoid much coding in aspx file I created util.js and put all code in this file but how to use these particular functions in aspx file I couldn't find the way.

Anyone have idea. Do share with me.

I used the reference like this:


' Font-Names="Verdana" Font-Size="8pt" Onkeyup= "keyUp(event.keyCode)" Onkeydown="return isAlphaNumeric(event.keyCode);" onpaste="return false;">

how to hide/display controls in NewForm.aspx based on dropdown value in SharePoint list



I have 1 dropdown in my sharepoint list with other columns. If dropdown value equal to 'xyz' i need to display some other controls, otherwise these controls should be hidden.

I know we can achieve this with javascript. If any one can provide code or sample then it will be appreciated. or is there any other alternative methods to do this ........

Thanks & Regards, Neerubee

Calling parameterized method from aspx file


Hi all,
I have following method
 public string GetYoutubeVideo (string code)
        return "asasdasfa"

Linking JS file to ASPX page or content page

Hi, I moved my JS functions into an external file "JScript.js", because I'm now using a master page and a content page.But it doesn't work any more, and I can't find why.I tried simply to link a js file to an ASPX file, by adding to the script manager the path of my script, but it doesn't work.Here is my js file (we don't need any special things in it do we?) var step1 = false; function pageLoad() { var accCtrl = $find('AccordionCtrl_AccordionExtender'); accCtrl.add_selectedIndexChanged(onAccordionPaneChanged); } function hideAccordionPane(paneNo) { ... } function changeSelected(idx) { ... } function onAccordionPaneChanged(sender, eventArgs) { ... } function check() { ... }And here is my ASP code: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0

How can create site in sharepoint foundation 2010 based on WSS 3.0 template(.stp file)

Hi,   I  want  to migrate wss3.0  site into sharepoint foundation 2010 site . earlier we  were creating site based on .stp file  in WSS 4.0 . but now we  have   to build same site in sharepoint foundation 2010. I followed  the old way  intall the .stp file  and  based on that trying to create new  site  but getting some error  old version template is not supporetd my this version. how could  l able to create  site  in sharepoint foundation 2010 based on wss 3.0 template . Please help Thanks in advance Jandel Singh

How can create site in sharepoint foundation 2010 based on WSS 3.0 template(.stp file)

Hi,   I  want  to migrate wss3.0  site into sharepoint foundation 2010 site . earlier we  were creating site based on .stp file  in WSS 4.0 . but now we  have   to build same site in sharepoint foundation 2010. I followed  the old way  intall the .stp file  and  based on that trying to create new  site  but getting some error  old version template is not supporetd my this version. how could  l able to create  site  in sharepoint foundation 2010 based on wss 3.0 template . Please help Thanks in advance Jandel Singh

How to change the split view when editing an aspx file

I've been using SPD 2010 more and more over the past few weeks.  However, when there's a navigation bar on the left, toolbox on the right, ribbon above and split view of code and design in the middle, there's just not enough room on the screen - (I have 2 LCDs at 1280x1024).  I can spread the window accross both monitors but that's not much use unless, I can change the split between code and design from horizontal to vertical. Is this possible?  Help apprieciated. Cheers, Bill

Changes in the values of controls of .cs file not reflecting on .aspx webpage while execution.

In my code I am assigning certain values to labels from data reader.While debugging I can see that proper values are assigned but the changes are not reflecting in the end of debug on the webpage that are executing.// My Code// Question.aspx.csusing System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;public partial class Examinee_Question : System.Web.UI.Page{    ExamFunctions ef = new ExamFunctions();    SqlConnection con,con1;    SqlCommand cmd,cmd1;    SqlDataReader dr,dr1;    String QType="";    int ctr = 1;    protected void Page_Init(object sender, EventArgs e)    {        con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Db.mdf;Integrated Security=True;User Instance=True");        con.Open();        con1 = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Db.mdf;Integrated Security=True;User Instance=True&qu

Access Javascript from an aspx file through another aspx file

Hello, So.. I have a file called myFile.aspx which is linked to a js file called myJS.js    There is a file linked to an entirely different frame called theOtherFile.aspx.  I want to access a function is myJS.js called myFunc in theOtherFile.aspxI am not entirely sure how I would accomplish that..I am quite new to MVC2 and JS, so I am quite confused as to how to do this.  Any suggestions would be much appreciated.~Anath

Disable child links in list.aspx : gridView based on some row condations


In the list.aspx page , Datagridview


I want to disable the links to the child table based on condition ,

let say if filed OrderDate is empty at row in table Orders I want to disable link to OrderDetailes for that specific row

How can we insert csv file data into Sql server table based on some condition ?


Hello All experts there,


I need to insert some csv file data into sql server 2008. but there are multiple tables created in sql server and I need to check some conditions before data insertion and based on the condition value, sql script should insert the data in to specific table. in other words I need to insert data from one csv file to different tables based on some condition.

is it possible? if yes then can anyone please give me an idea on how can we do that?


Thanks in advance


Nipendra Garg

url rewrite for images(.jpg file extension not .aspx)



I have stored DB images. and I try to access images using url rewrite. But it is not happaning.

I tried this scott methord. http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx. i tried with Application_BeginRequest, but no use

Basically Client don't want to use .aspx extension for images

Is it possible acess db images with out using .aspx file name extension?  then can anybody tell me how to achieve this!!!!!!!!!!!!

My sample url is "www.sample.com/images/folder/imagefilename.jpg" I want to rewrite to "www.sample.com/images/pimges/default.aspx?file=imagefilename.jpg&cat=folder"



Setup file(*.msi) also includes .aspx.cs (source code) files also


My project is recently migrated from 2008 to 2010

actualy we developed project in VS 2005 in that we created setup file but when we migrated to vs2008 setup file giving problem to us.

now when we make setup file it is including .aspx.cs files also but this if we publish our project it wont including source code.

why setup file including .aspx.cs files is there any way to change.

plz replay ASAP

Adding a server control on aspx page does not add events in aspx.designer.vb file



I work in VS 2008. Whenver I add a server control(Label) and set it properties in aspx.vb and build the solution, I get the error "Label1 not declared". While analyzing this issue I noticed that the event handler statements for the Label1 where not added in the designer.asp.vb file. These statement would actually be added automatically when I drag and drop a control to my webpage.

I would also like to inform the scenario after which this problem came to me. I was working in VS 2008 , VS 2005 and VS 2003 in the same machine.Could this have caused the issue ? Please advise.

Now each and everytime when I add a control, I am adding the "With Events" code in the designer page to make my build succesfull which makes me to spend more efforts.

Please advise if any settings have to be changed.



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend