Converting ASP Class Files to the ASP.NET Platform


I have recently just jumped on the ASP.NET bandwagon and I am trying to find a way to convert my class files to the new
asp.net way. So my question is this: does anyone know a good way to go about doing this
I have read the arguments of the advantages of ASP.NET over "ASP Classic" and im sold, but I just need some help on how i should convert my semi-object class files. I have
read many tutorials and seen examples on web forms and such, but I dont see anything about porting class files Maybe I just dont know what to look for Should I be looking at using Web Services, the .VB file type, asmx....
Posted On: Wednesday 2nd of January 2013 02:29:06 AM Total Views:  360
View Complete with Replies

RELATED TOPICS OF ASP.NET PROGRAMMING LANGUAGE




Problem while Creating a new directory in wwwroot folder

I am trying to create a new directory in "C:\\Inetpub\\wwwroot" through my C#.Net application and I used the following statement to create a subdirectory.Directory.CreateDirectory("C:\\Inetpub\\wwwroot\\foldername");But it is showing error in my catch block as "Access to the path "C:\\Inetpub\\wwwroot\\foldername" is denied.If i tried to create a new folder in Inetpub folder it is created without giving an error. we know wwwroot is a shared folder. Is it a problem. but my application need a subdirectory in wwwroot.Anyone Please Help me
VIEWS ON THIS POST

115

Posted on:

Sunday 25th November 2012
View Replies!

FORGOT PASSWORD

hi ,just i need the code for forgot password,in VBcity.com whenever i forget the password it asking us to give emailid and automatically it will generate password and it will be sended to user.so, i need the sample code used in this web site to generate password.
VIEWS ON THIS POST

161

Posted on:

Sunday 25th November 2012
View Replies!

Reseting page number in CR.NET (RESOLVED)

Hi all,I have a report in CR.NET and it is grouped by a group that I have created. I have a page X of Y counter on it. Is there a way of reseting this counter each time the group changes to new one
VIEWS ON THIS POST

105

Posted on:

Sunday 25th November 2012
View Replies!

clear quesry string value

hi everybody,i face another problem, i pass the value from a.aspx tp b.aspx but in b.aspx i need to clear the value pass to here. how can i do tht
VIEWS ON THIS POST

138

Posted on:

Sunday 25th November 2012
View Replies!

ReST and XML

I'm working in VB.NET and trying to write a ReST service that will output the data to an XML format for consumption in an RSS reader. Can anyone help me I understand ReST services for the most part now and have a basic one running with JSON output. I want to do the same thing now but with an XML output instead.
VIEWS ON THIS POST

140

Posted on:

Sunday 25th November 2012
View Replies!

Google map Javascript not working in FireFox but working in IE

This code is working properly in IE 7. The ICons are displayed on the Google Map. But when I run this code on FireFox the Icons are not visible in Google Map, only the Google Map Is Displayed. Please Help Me! function xyz() { if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else // Internet Explorer 5/6 { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.open("Get", "Bins.xml", false); xmlhttp.send(); xmlDoc = xmlhttp.responseXML; xmlDoc.load("Bins.xml"); x = xmlDoc.getElementsByTagName("Current_Location"); var j = 0; while (x.length > j) { z = x[j].getElementsByTagName("Vehicle_Name")[0].childNodes[0].nodeValue; y = x[j].getElementsByTagName("Latitudes")[0].childNodes[0].nodeValue; c = x[j].getElementsByTagName("Longitudes")[0].childNodes[0].nodeValue; s = x[j].getElementsByTagName("Speed")[0].childNodes[0].nodeValue; j++; var point1 = new GLatLng(y, c); var marker = createMarker(point1, ' Some stuff to display in the First Info window. With a Link to my home page', 7) map.addOverlay(marker); } } // if (GBrowserIsCompatible()) { function createMarker(point, html, SpriteNum) { var myicon = new GIcon(G_DEFAULT_ICON); myicon.image = Server.MapPath("Image/red1.jpg"); var marker = new GMarker(point, { icon: myicon }); GEvent.addListener(marker, "click", function () { marker.openInfoWindowHtml(html); }); return marker; } // Display the map, with some controls and set the initial location var map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(28.6495, 77.2182), 8); map.addControl(new GMapTypeControl()); map.addControl(new GLargeMapControl()); xyz(); } //]]> This post has been edited by lazy: 31 January 2011 - 03:11 AM
VIEWS ON THIS POST

133

Posted on:

Sunday 25th November 2012
View Replies!

FILE PERMISSION

Hi...could u pls tell me how do i change the file permissions dynamically by creating a interface for it..i am using vb.net..so pls tell me how to go abt with the coding..
VIEWS ON THIS POST

142

Posted on:

Sunday 25th November 2012
View Replies!

Image Capturing in ASP.NET 3.5 using WebCam

I would like to capture the image using WebCam and store it in database. I am using ASP.NET 3.5, C#, Visual Studio 2008, SQL Server 2008, Windows Vista Business (O.S), IIS 7.0 and IE 7.0. I want to integrate WebCam functionality in my Web Application. My requirement is, the end user can view the image (i.e., preview from the WebCam) in the Web page using ActiveX Control (in my case videocapx.ocx is the ActiveX Control). And on clik of "Capture" button, the image has to be capture and stored in database. For this I have installed "VideoCapX" software. I am using "ZEBRONICS" WebCam to capture images. Its model number is "Eagle's eye ZEB-480WC". How can I integrate "videocapx.ocx ActiveX Control" in my web page, so that end user can preview the image. Please help me out. It is very urgent.
VIEWS ON THIS POST

231

Posted on:

Monday 26th November 2012
View Replies!

What should I download to make exercies with ASP.NET?

Can u help me to download necessary platform And can u show how to write ' World'
VIEWS ON THIS POST

137

Posted on:

Monday 26th November 2012
View Replies!

giving the validation to datalist from one page to some other page

In one webuser control suppose "a.ascx" I have a datalist in that I have a linkbtn in itemtemplate. now In other web user control suppose "b.ascx" in this web user control "b.ascx" I want to check that IF there is any item named as "Final Page" available then page gets redirect to some other page else show alret msg Final page is not present. how its possible\t\t\t\t i am adding Final page in a.ascx, and in b.ascx i have btn go to net page nd i am calling both ascx page in a master page, now i want to check IF a.ascx is having Final page then btn go redirect other wise on btn click go should show some msg link Final Page is not added
VIEWS ON THIS POST

157

Posted on:

Tuesday 27th November 2012
View Replies!

DropDownList

Hi all I need your help, i want to select a field from a drop down menu, when selected i want to display all other fields related to that one in a table, and also when i select again it must be able to ca=hange all of them. here is my code Please help as soon as you can. i am new in .net [code] Sub GetName(ByVal obj As Object, ByVal e As EventArgs) lbl.Text = DropDownList2.SelectedItem.Text lbl2.Text = "5%" lbl3.Text = "45%" lbl4.Text = "PLEASE SELECT A FREQUENCY" lbl7.Text = "100%" lbl8.Text = "100%" End Sub VMO Perfomance Scorecard GT VMO - VENDOR PERFOMANCE SCORECARD & STRATEGIC CLASSIFICATION TOOL var today = new Date() document.write ("Date: ") document.write (today)  Vendor Name:    Assessment Period - From:  Rater:    Assessment Period - To:  Date Scored:                Sub GetData(ByVal obj As Object, ByVal e As EventArgs) 'Dim x As Integer 'Message.Text = "Selected Item(s):" ' For x = 0 To DropDownList3.Items.Count - 1 'If DropDownList3.Items(x).Selected Then 'Message.Text += DropDownList3.Items(x).Text + "" 'End If 'Next lbl5.Text = DropDownList3.SelectedItem.Text Dim DataConn 'Holds the Database Connection Object Dim rs1 'Holds the recordset for the records in the database Dim sql Dim ds As New Data.DataSet() Dim dt As New Data.DataTable DataConn = Server.CreateObject("ADODB.Connection") DataConn.Provider = "Microsoft.Jet.OLEDB.4.0" DataConn.CommandTimeout = 2000 DataConn.Open(Server.MapPath("/WebSite5/VMOScorecards.mdb")) 'Dim dt As Data.DataTable = DataConn.GetSchema("VMO_SCORECARD") dt = ds.Tables.Item("VMO_SCORECARD") 'lbl6.Text = dt.Rows(0)("DESCRIPTION").ToString() Dim VMO_SCORECARD = dt rs1 = Server.CreateObject("ADODB.Recordset") sql = "SELECT [DESCRIPTION] , [FREQUENCY], [VALUES1], [VALUES2], [VALUES3], [VALUES4], [VALUES5], [PERFORMANCE_WEIGHT], [STRATEGIC_WEIGHT], [CATEGORY_COMPONENT] FROM [VMO_SCORECARD] where 1 = 1" rs1.Open(sql, DataConn) 'Response.Write("") Dim i As Integer Dim value = DropDownList3.Items(i).Value.ToString For i = 0 To DropDownList3.Items.Count - 1 If DropDownList3.Items(i).Selected Then Message.Text += DropDownList3.Items(i).Text + "" End If lbl6.Text = rs1.Fields(0).value lbl9.Text = rs1.Fields(1).value lbl10.Text = rs1.Fields(2).value lbl11.Text = rs1.Fields(3).value lbl12.Text = rs1.Fields(4).value lbl13.Text = rs1.Fields(5).value lbl14.Text = rs1.Fields(6).value lbl15.Text = rs1.Fields(7).value lbl16.Text = rs1.Fields(8).value Label1.Text = rs1.Fields(9).value 2: Label2.Text = rs1.Fields(9).value Label3.Text = rs1.Fields(9).value Label4.Text = rs1.Fields(9).value Label5.Text = rs1.Fields(9).value Label6.Text = rs1.Fields(9).value Next 'Response.Write("") DataConn.Close() End Sub Metric Description Frequency Values Score Performance Weighting Strategic Weighting Adjusted Performance Score Adjusted  Strategic Score       &nbs
VIEWS ON THIS POST

142

Posted on:

Tuesday 27th November 2012
View Replies!

Object variable or With block variable not set.

I am stuck, I have a grid view that has a onclick event to load a new page and pass a value. the new page doesn't seem to run its SQl update statement correctly for some reason and once i close the page and try to do anything on the old page i receive this error. I think it may have somthign to do with how I use my grid view. I am currently using an sqldataadapater to fill a dataset and then binding the dataset to the datagrid. Any help would be appreciated thanks! Server Error in '/ALMITACM' Application. -------------------------------------------------------------------------------- Object variable or With block variable not set. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object variable or With block variable not set. Source Error: Line 154: e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=this.originalstyle") Line 155: Line 156: e.Row.Attributes.Add("onclick", "window.open('callinfo.aspxarg=" & e.Row.DataItem(0).ToString & "','CallInfo','width=850,height=300,toolbar=0,resizable=0'); this.style.background='#00CCFF';this.style.color='black';") Line 157: Line 158: End If Source File: D:\Dev\ALMITACM\Default.aspx.vb Line: 156 Stack Trace: [NullReferenceException: Object variable or With block variable not set.] Microsoft.VisualBasic.CompilerServices.Container..ctor(Object Instance) +248692 Microsoft.VisualBasic.CompilerServices.NewLateBinding.InternalLateIndexGet(Object Instance, Object[] Arguments, String[] ArgumentNames, Boolean ReportErrors, ResolutionFailure& Failure) +71 Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateIndexGet(Object Instance, Object[] Arguments, String[] ArgumentNames) +22 _Default.gvACM_RowCreated(Object sender, GridViewRowEventArgs e) in D:\Dev\ALMITACM\Default.aspx.vb:156 System.Web.UI.WebControls.GridView.OnRowCreated(GridViewRowEventArgs e) +105 System.Web.UI.WebControls.GridView.CreateRow(Int32 rowIndex, Int32 dataSourceIndex, DataControlRowType rowType, DataControlRowState rowState, Boolean dataBind, Object dataItem, DataControlField[] fields, TableRowCollection rows, PagedDataSource pagedDataSource) +136 System.Web.UI.WebControls.GridView.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +2957 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +152 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.WebControls.CompositeDataBoundControl.get_Controls() +12 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +24 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +224 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +136 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +224 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +136 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +224 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +136 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +224 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +136 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +224 System.Web.UI.Page.LoadState() +439 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1092
VIEWS ON THIS POST

164

Posted on:

Tuesday 27th November 2012
View Replies!

comparing times

hi im having a slight problem with something im looking to do a countdown timer, im comparing a record ive pulled from a databse which has a date/time field against the current time of the machine/server. dim time,timethen, timess timenow=Cdate(formatdatetime(now(),4)) timethen=cdate(objectrecordset("eta")) timess=timethen-timenow response.write(timess) so this produces a number which isnt right its not formated and isnt the right time\t anybody have any ideas on how i could solve this problem
VIEWS ON THIS POST

205

Posted on:

Tuesday 27th November 2012
View Replies!

Javasript Confirm() when a condition exist in the server

I am having a problem trying to pop\tup a confirm message box in the client side when a condition is met in the server. I have a delete button that when pressed, could warm the user of something if that condition evaluates true in the server side.I can get the confirm message box to appear if I add attributes to my delete button on my form_Load event:something like this:protected void Page_Load(object sender, EventArgs e)\t\t{\t\t\tbtnDelete.Attributes.Add("OnClientClick","return confirm( 'You are going to Delete everything. Are you sure';)"); }but this just guarantee that the message will pop up everytime I pressed the delete button and not just when the condition is met.I also tried to register a script in my btnDelete_Click event, doing something like this:protected void btnDelete_Click(object sender, EventArgs e)\t\t{\t\t\t\tSystem.Text.StringBuilder sb = new System.Text.StringBuilder();\t\t\t\tsb.Append(@"");\t\t\t\tsb.Append(@"return confirm('Delete Everything');");\t\t\t\tsb.Append(@"");\t\t\t\tif (!ClientScript.IsStartupScriptRegistered("JSScript"))\t\t\t\t{\t\t\t\t\tClientScript.RegisterStartupScript(typeof(Page), "JSScript", sb.ToString());\t\t\t\t}\t\t}but in this case the message box just appear when I click the button twice.Can anybody help me with this I would really appreciate any ideas
VIEWS ON THIS POST

118

Posted on:

Tuesday 27th November 2012
View Replies!

Connecting to remote db

My asp.net pp is trying to connect to db on remote server. It is failing with error SQL Server does not exist or access denies. Here is my conn string\t\t\t\tThe funny thing that it used to connect fine but then I copied some new code to my app and now stopped working.Web.config has not changed. The app is using Microsoft.Practices.EnterpriseLibrary.Data to connect to db.What could be wrong all of a sudden\t
VIEWS ON THIS POST

129

Posted on:

Tuesday 27th November 2012
View Replies!

Compare Validator Problems with Nulls

Hi all,I think i may have found a problem with the compare validator.\tI have two text boxes, one for a password and one to compare the password to ensure that he user has entered the password in correctly.\tThe thing is on a particular form i have a problem, becuase the updating of the password is not compulsary so the confirm password text box is not requried.\tIf the user types in a new password and leaves the confirm blank, the validation passes.\tThe validation works for the compare if the there is a value in the confirm password box and it differes from the password box, but not if the confirm password is null\t Anyone know how to get around this
VIEWS ON THIS POST

95

Posted on:

Tuesday 27th November 2012
View Replies!

Splash screen in ASP.NET

Is there a chance of having a 'splash'.. page shown while the main page (default.aspx) is fully loaded The splash will have some welcome words and a small gif animation.Tnx!
VIEWS ON THIS POST

100

Posted on:

Tuesday 27th November 2012
View Replies!

Jump to another part of the same page after a postback

Is there a way with ASP.NET that after the page is post back jump to another location of the same page For example, when a user clicks on a LinkButton control in offer_details.aspx page, jump to a location of the page so that is visible a specified table from the bottom of the page.\tThank you
VIEWS ON THIS POST

145

Posted on:

Tuesday 27th November 2012
View Replies!

Form to copy file to unc path

I was wondering if any one coud help with this one. I have a asp form that takes a file from . I was wondering if there was a easy way to copy this file to a network share. The destination folder is outside the IIS \inetpub\wwwroot folder ie., c:\destination\folder1\the path I need to copy the file to is \\servername\sharenameAny assistance will be of great help.
VIEWS ON THIS POST

137

Posted on:

Tuesday 27th November 2012
View Replies!

skip DTD in xml load

i have a question i have some xmls with in the header :CODEHowever this TestAsset is not present, is there any way to skip it during the doc.Load(rtxmlfile) (Since it now generates an error) -- http://leau.net
VIEWS ON THIS POST

143

Posted on:

Tuesday 27th November 2012
View Replies!

Dropping Record Writing to DB

My problem is I am dropping the first record in my Dataset when writing to the DB.CODEDim MyDataSet As New DataSetMyDataAdaptor.Fill(MyDataSet)Dim MyDataRow As DataRowDim strSQL As String = ""Dim sqlConnection As SqlClient.SqlConnectionDim sqlCommand As SqlClient.SqlCommandDim sqlCommand2 As SqlClient.SqlCommandFor Each MyDataRow In MyDataTable.Rows\tsqlConnection = New SqlClient.SqlConnectionstrConnection)\tsqlConnection.Open()\tstrSQL = "INSERT INTO\tdbo.inv1000_bar_code_uploaded_schools VALUES('" & _\t\t\t\t\t\t\t\t\t\tMyDataRow(6) & "','" & _\t\t\t\t\t\t\t\t\t\tMyDataRow(1) & "','" & _\t\t\t\t\t\t\t\t\t\tMyDataRow(2) & "','" & _\t\t\t\t\t\t\t\t\t\tMyDataRow(3) & "','','" & _\t\t\t\t\t\t\t\t\t\tMyDataRow(4) & "','" & _\t\t\t\t\t\t\t\t\t\tMyDataRow(5) & "','" & _\t\t\t\t\t\t\t\t\t\tMyDataRow(0) & "')"sqlCommand2 = New SqlClient.SqlCommand(strSQL,sqlConnection)\t\t\t\t\t\tsqlCommand2.ExecuteNonQuery()\t\t\t\t\t\tsqlConnection.Close()NextCan't figure out why I am not writing the first record to the DB. I have written out the Dataset and all records are included there. But, when I insert into the DB, the first record is absent
VIEWS ON THIS POST

128

Posted on:

Tuesday 27th November 2012
View Replies!

Anchor tag in email body

I can't get this line to functionobjEmail.Body="Owner:  " + insertfirstname.text + " " + insertlastname.text + " Hardware:  " + inserthardware.selecteditem.value + "      Software:  " + insertsoftware.selecteditem.value + " Problem Description: " + insertproblem.text + " Importance:  " + insertimportance.selecteditem.value + " ' "test""
VIEWS ON THIS POST

117

Posted on:

Tuesday 27th November 2012
View Replies!

make label text invisible after 3 minute?

I use label as message bar. Is it possible to make label text invisible after 3 minute
VIEWS ON THIS POST

152

Posted on:

Tuesday 27th November 2012
View Replies!

System.Reflection.AmbiguousMatchException

Here's the error code, what does it mean (technology...)System.Reflection.AmbiguousMatchException: No accessible overloaded 'OleDbDataAdapter.Update' can be called without a narrowing conversion. at Microsoft.VisualBasic.CompilerServices.VBBinder.set_InternalThrow(Exception Value) at Microsoft.VisualBasic.CompilerServices.VBBinder.BindToMethod(BindingFlags bindingAttr, MethodBase[] match, Object[]& args, ParameterModifier[] modifiers, CultureInfo culture, String[] names, Object& ObjState) at Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String name, BindingFlags invokeAttr, Type objType, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) at Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack) at ASP.seniors_aspx.newWebNum() in C:\Inetpub\wwwroot2\secure\seniors.aspx:line 75 From this line:objAdapt.Update(objRow(0))Here's where I create my Update command... what do I doobjAdapt.UpdateCommand = new oledbcommand("UPDATE tblNewOrderNum SET wOrder = wOrder + 1", objConn)
VIEWS ON THIS POST

135

Posted on:

Wednesday 28th November 2012
View Replies!

New To .NET

all,I am an ASP programmer for 2-3 years.Now my boss tells me to move to .NET.I have some very primary questions.1> Does it support all browsers 2> How to start Where will I get learning tutorials 2> what are advts and disadvts of it
VIEWS ON THIS POST

168

Posted on:

Wednesday 28th November 2012
View Replies!

Get a value from a Web Control

I am trying to get the value/text on a label located within a Web User Control and parse it to the following:This is my current code, which worked before I put in the web user control. The lblUserID is now located in the web user control 'Header'CODEcmd.Parameters.Add("@Sender", SqlDbType.Int).Value = lblUserID.Text.Trim()I am getting the error CODE Name lblUserID is not declaredHelp pleas
VIEWS ON THIS POST

396

Posted on:

Friday 28th December 2012
View Replies!

a href wrapped around flash object

I have the following code\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tThe problem is when I view and click the object, it doesnot open in a new window, even with target='_blank'...
VIEWS ON THIS POST

121

Posted on:

Friday 28th December 2012
View Replies!

update panel updating

all,Im trying to get an update panel to update while I am executin a large process. If I can output to the screen, I will know exactly where the process is up to. For example://.aspxCODE\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//.aspx.csCODEusing System;using System.Threading;public partial class _Default : System.Web.UI.Page{\t\tprotected void Page_Load(object sender, EventArgs e)\t\t{\t\t\t\t\t\t}\t\tprotected void Button1_Click(object sender, EventArgs e)\t\t{\t\t\t\tThread.Sleep(1000);\t\t\t\tLabel1.Text = "TEXT1";\t\t\t\tThread.Sleep(1000);\t\t\t\tLabel1.Text = "TEXT2";\t\t\t\tThread.Sleep(1000);\t\t\t\tLabel1.Text = "TEXT3";\t\t}}Im the above example, when Button1 is clicked, the update panel is updated without an actual page refresh. However, when the button is clicked I do not see label1 altering value from "TEXT1" to "TEXT2" to "TEXT3", all that I see is "TEXT3" after a short pause (due to the Thread.Sleep commands.).Any ideals how I could go about updating the text in Label1 while the code in Button1_Click is still exectutingI have even tried to add in "UpdatePanel1.Update();" after setting each Label.Text value, however same happens.
VIEWS ON THIS POST

132

Posted on:

Friday 28th December 2012
View Replies!

Need to get control id from content page

First of all, I am using a 3rd party graphing control.I am using vs 2008.The control actual renders as a activex control, the control is in my content page, this page also has some vbscripting on it, that tracks the users mouse movements when hovering over the graph tool.The page comes up just fine but when you move your mouse over the tool I get a vbscripting error saying it can't find the controls ID.This is what is renderd: My id is PegoWeb1 and this is what the vbscript is looking for but I get an error saying Object required: 'PegoWeb1'I have tried putting ct100_ in front of the name but still get the same error.It all runs just fine if it's not in a content page, just a regular page
VIEWS ON THIS POST

119

Posted on:

Friday 28th December 2012
View Replies!

Populating formview with data from a different query

I have a ListBox of "Products" that uses a query from one DB table. When I select a product, I want to populate the pertinent form fields in the FormView, that uses a different query for inserting into a different DB table, with the data pertaining to that product. The FormView is in Insert Mode, as I want to insert the information into it's DB table in the database after it has been populated.
VIEWS ON THIS POST

91

Posted on:

Friday 28th December 2012
View Replies!

Losing focus on postback

I have a postback occuring when the user changes the text in a textbox within a gridview. Once the user tabs off the field the TextChanged event executes as expected. However, when my page is refreshed, I want the focus to be set back to the control that the user had originally tabbed to just before the postback occurred. How can I know which control that wasThx.
VIEWS ON THIS POST

121

Posted on:

Tuesday 1st January 2013
View Replies!

Return value using execute non query in DAAB2

,I am using the DAAB v2 and am having problems with getting the number of rows effected when running an execute non query. Here is my code, can anyone see where i am going wrong.CODE\t\t\t\tPublic Function Update() As Boolean\t\t\t\t\t\tDim i As Integer\t\t\t\t\t\t'Setup Parmaters Array\t\t\t\t\t\tDim arParms() As SqlParameter = New SqlParameter(8) {}\t\t\t\t\t\tarParms(0) = New SqlParameter("@DownloadID", SqlDbType.Int, 4)\t\t\t\t\t\tarParms(0).Value = _DownloadID\t\t\t\t\t\tarParms(1) = New SqlParameter("@DownloadTypeID", SqlDbType.Int, 4)\t\t\t\t\t\tarParms(1).Value = _DownloadTypeID\t\t\t\t\t\tarParms(2) = New SqlParameter("@DownloadCategoryID", SqlDbType.Int, 4)\t\t\t\t\t\tarParms(2).Value = _DownloadCategoryID\t\t\t\t\t\tarParms(3) = New SqlParameter("@DownloadTitle", SqlDbType.VarChar, 100)\t\t\t\t\t\tarParms(3).Value = _DownloadTitle\t\t\t\t\t\tarParms(4) = New SqlParameter("@DownloadDescription", SqlDbType.VarChar, 255)\t\t\t\t\t\tarParms(4).Value = _DownloadDescription\t\t\t\t\t\tarParms(5) = New SqlParameter("@DownloadLocation", SqlDbType.VarChar, 255)\t\t\t\t\t\tarParms(5).Value = _DownloadFile\t\t\t\t\t\tarParms(6) = New SqlParameter("@DownloadThumbnail", SqlDbType.VarChar, 255)\t\t\t\t\t\tarParms(6).Value = _DownloadThumbnail\t\t\t\t\t\tarParms(7) = New SqlParameter("@IsActive", SqlDbType.Bit, 1)\t\t\t\t\t\tarParms(7).Value = _IsActive\t\t\t\t\t\tarParms(8) = New SqlParameter("@Result", SqlDbType.Int, 4)\t\t\t\t\t\tarParms(8).Direction = ParameterDirection.ReturnValue\t\t\t\t\t\tSqlHelper.ExecuteNonQuery(ConfigurationSettings.AppSettings("ConnectionString"), _\t\t\t\t\t\t\t\tCommandType.StoredProcedure, "HARBADMIN_UpdateDownload", arParms)\t\t\t\t\t\t'Return True\t\t\t\t\t\tReturn CBool(arParms(8).Value > 0)\t\t\t\tEnd Functio
VIEWS ON THIS POST

169

Posted on:

Tuesday 1st January 2013
View Replies!

FormsAuthenticationTicket expires despite being persistent

I need help with FormsAuthentication. I want to set a cookie on the client which never expires, i.e. is persistent. The code I'm using is below. Notice the expiry date is set to +10 year, and the isPersistent argument is set to true.CODEFormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, txtUsername.Text, System.DateTime.Now, System.DateTime.Now.AddYears(10), true, "string containing user data", FormsAuthentication.FormsCookiePath);When I view the resultant cookie in Firefox it tells me it is set to expire 'on end of session', and that is exactly what happens. What else do I need to do to stop this happening... Tom
VIEWS ON THIS POST

127

Posted on:

Tuesday 1st January 2013
View Replies!

How do I resolve an error 'Invalid @ Command directive'

Here is an error message:Active Server Pages error 'ASP 0221' Invalid @ Command directive /PlanWeb/WebForm1.aspx, line 1 The specified 'Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" Inherits="PlanWeb.WebForm1"' option is unknown or invalid. I tried to change the executable path in application configuration from asp.dll to aspnet_isapi.dll, but it only caused a different error:HTTP Error 404 - File or directory not found.Internet Information Services (IIS
VIEWS ON THIS POST

118

Posted on:

Tuesday 1st January 2013
View Replies!

Display Parent-Child Recordset and allow update

I am totally new to .net and I want to get on board asap.I was wondering if someone can show me an example of how to display a parent/child recordset and also allow a user to update values of certain columns.\tI would like the child recordset to be collapsed and only expanded when click on parent link. Very much appreciated.
VIEWS ON THIS POST

81

Posted on:

Tuesday 1st January 2013
View Replies!

Using Datareader inside Transaction Problem

"The SQL command is currently busy Open, fetching." That is the error that I keep getting whenever I use the datareader to retrieve a record inside a transaction. But only when another command (insert with cmd.ExecuteNonQuery()) follows. \t\tI think that .NET 1.1 does not like this. I remember installing 2.0 preview for testing, and the error did not occur. But using 2.0 for this project is not possible. Do you have any recommendations. I am specifically trying to get the identity value of the insert with SCOPE_IDENTITY() and saving it to a variable. I am trying not to use stored procs.
VIEWS ON THIS POST

140

Posted on:

Tuesday 1st January 2013
View Replies!

Easy One - Hide Client Scrollbar

I'm trying to hide the Client's scroll bar (vertical) through ASP .net code.How do I do this
VIEWS ON THIS POST

183

Posted on:

Tuesday 1st January 2013
View Replies!

Write and Retrieve text file to/from Database

I have a multiline textbox that will hold paragraphs of information.\tI think that I have to write the data to a text file and save the text file to the database, because it doesn't save all of the data when I use the usual request.form("txtArticle") .\tDoes anyone know of a good article that writes the data to a text file, saves it to a relative path within my project, saves the link to the database, and then retrieves and displays the data on a webpage, inluding all indentions and newlines
VIEWS ON THIS POST

80

Posted on:

Tuesday 1st January 2013
View Replies!

ASP.NET impersonation seems incomplete on 2003 server

I am using an Interop library to access AutoCAD 2002.\tI am unable to create a class using this library in my ASP.NET application on 2003 server using the following code:AcadApplication app = new AcadApplicationClass();However, if I create a windows application using the exact same interop, I have no trouble.\tSo I figure its a user rights issue.I have tried impersonation in code using the LogonUser API and the element in the web.config file.\tBoth work because System.Security.Principal.WindowsIdentity.GetCurrent().Name return the correct identity.\tStill no luck.I get an error message in the system log as follows:Event Type:\t\tErrorEvent Source:\t\tDCOMEvent Category:\t\tNoneEvent ID:\t\t10010Date:\t\t\t\t1/22/2004Time:\t\t\t\t2:38:48 PMUser:\t\t\t\tWEB\AdministratorComputer:\t\tWEBDescription:The server {8E75D911-3D21-11D2-85C4-080009A0C626} did not register with DCOM within the required timeout.For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.This problem does not occur on Windows XP.\tHowever, I can reproduce the problem on XP by impersonating a user that has never actually logged on the the XP computer and hence has no user profile in C:\Documents and Settings.\tSo it seems like AutoCAD is trying to access Documents and Settings and can't.Does anyone know if there is a way to make the ASP.NET application run under the same security context as a Windows ApplicationAfter all, the windows application runs fine under the same environment on the same box, using the same interop.\tThank you for any other suggestions!
VIEWS ON THIS POST

143

Posted on:

Tuesday 1st January 2013
View Replies!

Adding a SerialNo column in DataGrid

I want to add a Record No (Serial NO) column in the datagrid. I think may be I Can use Template column. But I dont know how to use it.. Can some one explain me with the code
VIEWS ON THIS POST

157

Posted on:

Tuesday 1st January 2013
View Replies!

Help with a nested Datalist

I am trying to create Nested Datalist and it doesn't like my relation statement. Any help would be great. Visual Studio tells me that "Override Resolution failed because no accessible add can be called with these arguments. selectCMD1 = New SqlCommand()\t\t\t\t\t\tselectCMD1.CommandText = "Select * from medicalreimb where loginID = '" & employee.SelectedItem.Value & "' and theyear = '2003'"\t\t\t\t\t\tselectCMD1.Connection = dbconn\t\t\t\t\t\tselectCMD1.CommandTimeout = 30\t\t\t\t\t\tdbconn.Open()\t\t\t\t\t\tDim empDA As SqlDataAdapter = New SqlDataAdapter()\t\t\t\t\t\tempDA.SelectCommand = selectCMD1\t\t\t\t\t\tDim empDS As DataSet = New DataSet()\t\t\t\t\t\tempDA.Fill(empDS, "medicalreimb")\t\t\t\t\t\tdbconn.Close()\t\t\t\t\t\tempDS.Relations.Add("myrelation", empDS.Tables("medicalreimb").Columns("loginID"))\t\t\t\t\t\tmedicaldata.DataSource = empDS.Tables("medicalreimb")\t\t\t\t\t\tmedicaldata.DataBind()
VIEWS ON THIS POST

145

Posted on:

Tuesday 1st January 2013
View Replies!

SSI Issues

I used to use to reuse code.\tIn particular, I have some controls on a web page for a search form (countries, states, etc) that are the same all the time.\tMy thought was to use the same method i used to (of course aspx now) and have the included file print the dropdownlist (taken from SQL).\tSo, say, in countries.aspx, i have it read the data from the sql server, and generate and asp:dropdownlist, and asp:listitems for all the countries.\tI did this, included the file, and called the function.\tIt worked in so much as it printed my entries, but it didn't compile the asp:dropdownlist to be a selectbox in the browser... so what i don't know is if I just changed the included file to print a select box, and not an asp:dropdownlist.\tHow would that affect the runat=server aspect of it, etc.thoughts\tTHANKS.
VIEWS ON THIS POST

347

Posted on:

Tuesday 1st January 2013
View Replies!

access network shares through web?

I have win2k server (myserver) with Active Directory. Another standalone server (printsrv), this is also my web server. I developed a site and hosted at (printsrv). Now I want to make a link at my site so that my Active Directorys user can access their network drive which is located at (myserver) server.I set windows authentication at my website (printsrv) and whenever a person will click that link it will ask for user name and password. Its all working fine. But now when I am programmatically going to access the share of user at (myserver) he is asking me for password and whatever password I am giving he is not authorizing me to access their network shares. Although I am giving my domains administrator password. Here is my code in c#:string[] achDrives = Directory.GetDirectories("\\\\myserver\\username"); I am developing my site in ASP.Net. I have administrative rights.How I can access my shares from domain controller server through web
VIEWS ON THIS POST

117

Posted on:

Tuesday 1st January 2013
View Replies!

Configuration File - Dynamic settings

I am aware off , where you can define Key and Value....However I would like to be able to have my own section in web.config, called . Here would be an example:1) Is it possible to use my own custom section like this with different attributes Where would I place it in web.config2) How would I read it in my C# application The number of files (myfilex.txt) can be unlimited...Please help.
VIEWS ON THIS POST

169

Posted on:

Wednesday 2nd January 2013
View Replies!

Service Unavailable

HiMy archery club web site is written in classic asp, but I want to rewrite it in .net at some point.\tTo that end, I asked my hosting co to move my domain to a server which has asp.net v2 installed.Tell me if I'm wrong, but asp and .net should be able to coexist quite happily shouldn't they\tI'm sure asp, asp.net 1.0, 1.1 and 2.o should be able to run on the same serverMy site just says "Service Unavailable" and the techies don't seem to know how to handle it.As I say, my site is pure classic asp at the moment, not a mixture.Any ideas, please
VIEWS ON THIS POST

121

Posted on:

Wednesday 2nd January 2013
View Replies!

Cancelling page keypress from clicking button

Hi ,I have a web form that has, among other things, a button control. When the user presses the enter key from anywhere in the form, the click event of the button is automatically fired. I do not want this behavior. I only want to fire the click event of the button when the user deliberately clicks on it. Any ideasI'm using ASP.NET with Visual Studio .NET 2002 and C#, on a machine with Windows 2000 Server. The browser I'm using to test the application is Microsoft Internet Explorer 6.0
VIEWS ON THIS POST

106

Posted on:

Wednesday 2nd January 2013
View Replies!

Datagrid w/ embedded Datagrid...

How would I set up a datagrid ( 6 columns ) with a first column that is clickable to show a datagrid directly under the row I know that I need a Template column, but i'm not sure where I need to put it... "...we both know I'm training to become a cagefighter...see what happens if you try 'n hit me..."
VIEWS ON THIS POST

98

Posted on:

Wednesday 2nd January 2013
View Replies!

execute a VBA function in asp.net

Is it possible to execute a VBA function in asp.net that converts a spreadsheet to a CSV file (or equivalent in .net)CODESub ConvertToCSV(strFileLocation As String, strFileName as String)\t\tChDir strFileLocation\t\tstrFileName = strFileLocation & "\" & strFileName \t\tActiveWorkbook.SaveAs Filename:=strFileName, _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=FalseEnd SubI'm trying to convert an Excel spreadsheet to a CSV so that I can insert it into a table in sql server -- programmatically. The reason is that there will be many spreadsheets with the same format that will be inserted into the same table.I tried experimenting with a DTS package to do a bulk upload to the database, but it gives me an error. It seems that DTS is real cranky when it comes to datatypes etc and everything has to be just perfect for it to work. I'd rather just make it simpler, using a CSV file. I get more control over the code.Maybe there is an object in .NET that does this same functionality I would imagine there is one, but I can't find it.
VIEWS ON THIS POST

67

Posted on:

Wednesday 2nd January 2013
View Replies!

Adding controls to Repeater Control dynamically

I have a repeater control that is getting results from the database.\tNow, I would like to dynamically create another repeater control inside the .\tI have placed a PlaceHolder control in the tag.\tI then create a repeater object dynamically, collect additional records that would be displayed in the child repeater object, and try to display it.\tEverytime I try to add the child repeater object to the Placeholder, I get the following error.Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Any Ideas \t
VIEWS ON THIS POST

55

Posted on:

Wednesday 2nd January 2013
View Replies!

Windows XP created its own User Account ASP.net machine A... .

I did a clean reinstall yesterday and today when I went to customize my users I found a user called Asp.net Machine A..., is this normal and if so what application does this. The user account does not appear at the welcome screen only in the usser account section. Please help
VIEWS ON THIS POST

114

Posted on:

Wednesday 2nd January 2013
View Replies!