How can I define a dynamic session variable array?


all,

How can I define a dynamic session variable array in
asp.net

Or, can I define a dynamic variable array in a web form

I am now using web application project in vb.net to
develop asp.net. But I can't find a good method to
interchange variables across different procedures in a web
form.
Posted On: Wednesday 2nd of January 2013 02:30:05 AM Total Views:  327
View Complete with Replies

RELATED TOPICS OF ASP.NET PROGRAMMING LANGUAGE




Removing an Image from Server

all!Was wondering if anybody could help me with this problem. I have managed to implement my image upload feature, offering a user the ability to replace their profile image.The only problem is that all of the old images still remain on the server and worse still if a user wishes to change back to the image they were using previously then an entirely new file is uploaded with a different name.The tutorial that I have used to perform the uploads is at: http://www.codeproject.com/aspnet/netimageupload.aspcould anybody help me add to this script to include functionality to remove an image before a new one is uploaded
VIEWS ON THIS POST

162

Posted on:

Tuesday 1st January 2013
View Replies!

security problem with a FileUpload

Here is my very simple program :Code behind :using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.IO;public partial class _Default : System.Web.UI.Page {protected void Page_Load(object sender, EventArgs e){DirectoryInfo theFolder = new DirectoryInfo(@"C:\temp\Server_Attachments\6");string Attachment = "";foreach (FileInfo nextFile in theFolder.GetFiles()){Attachment += "" + nextFile.ToString() + "";div1.InnerHtml = Attachment;}}protected void Attach_File(object sender, EventArgs e){FileUpload1.SaveAs(@"C:\Server_Attachments\6");}} HTML : Neither the hyperlinks, neither the upload are working :(- when I am clicking on the hyperlinks nothing is happening (although "Save target as" is working).- when I am trying to upload, I have got the error "Access to the path 'C:\Server_Attachments\6' is denied."On the server :It is obviously a security issue. I have checked which account was running the program and it is NETWORK SERVICE.On my laptop :I have run my program on my laptop and still got the same error. It means that with the "pseudo" web server enhanced in VS2005, the same problem occurs ("Access to the path X is denied").I have used System.Security.Principal.WindowsIdentity.GetCurrent().Name to check who was running the program and it is me. I have got administrator's rights on my workstation. I can copy a file in this folder on my own but not via ASP.NET.Any idea how to fix this problem (options in Visual Studio)
VIEWS ON THIS POST

195

Posted on:

Tuesday 1st January 2013
View Replies!

Writing a software manual

HiI am close to finishing my first software project and I need to write a software manul.As this is my first project, I dont know how to write a software manul.Is there any good example on the net that I can follow to write my manulKind regards
VIEWS ON THIS POST

385

Posted on:

Tuesday 1st January 2013
View Replies!

Datagrid: Multiple Rows Per Dataset Row

If a row of data in a dataset has a lot of columns the row displaying thedata in a datagrid will run way off the screen. What I'd like to do isdisplay a row of data over two datagrid rows so the user doesn't have toscroll horizontally. Essentially, I want to wrap a datagrid row (not text inindividual columns) with as much control as possible. For example, 10 columns on the first row and then 3 columns on the second row for the same physical record in the dataset.Is this possible\tOr is a datalist the only straightforward way to do this
VIEWS ON THIS POST

351

Posted on:

Tuesday 1st January 2013
View Replies!

Browsing to page and extracting HTML

I have the needed to send an email containing information that is contained on a another page in our application.\tI figured there was a way to fairly easily just navigate to the page and then scrape the html.\tI've done that in VB6 with the Internet Control.\tWhat is the best way to do that in ASP.NET\t
VIEWS ON THIS POST

410

Posted on:

Tuesday 1st January 2013
View Replies!

How can I get bgcolor='transparent' to work in netscape?

Hi ,I have a control with a transparent background color, which netscape is showing incorrectly (the background color shows up as blue). Is there any way to make the transparent background color to work in netscapeI'm doing the testing in Netscape 7.2
VIEWS ON THIS POST

447

Posted on:

Tuesday 1st January 2013
View Replies!

Request object

How do you get hold of the complete http message I want to write back to the browser what is being sent. Jon"I don't regret this, but I both rue and lament it."
VIEWS ON THIS POST

233

Posted on:

Tuesday 1st January 2013
View Replies!

Best way to do this?

I have several dropdowns on a page that are populated dynamically.\tThey're going to need to lose a value every time one of the other ones has a value selected (they all have the same list of numbers, but when one is chosen in one ddl, it needs to disappear from the rest).\tI'd like to do this on the client side, to avoid postbacks, but I'm not sure how to go about it.\tI have a script I use for populating other ddls based on the actions of one, but I can't figure out how to have it read the data in the ddls & edit it appropriately, since the controls are in a repeater & will have those lovely client IDs.Am I looking for something that can't be done
VIEWS ON THIS POST

287

Posted on:

Tuesday 1st January 2013
View Replies!

MultiSelect Dropdown

Guys,Can anyone point me a link or provide sample code that creates a multiselect dropdown list.I dont want to put a list box instead becasue of the space restrictions.I did google for sometime and could only find this control at http://www.easylistbox.com/demoMultiDropDown.aspxbut it is not free
VIEWS ON THIS POST

208

Posted on:

Tuesday 1st January 2013
View Replies!

Improving HTML performance of DataGrids

I'm looking for ways to improve the HTML performance of ASP.NET webpages using scrollable DataGrids... The larger the datagrid, the longer it takes for the webpage to display with the grid. That blank white page displaying for a few seconds between displays of the webpages can be annoying. Supposedly if I were able to remove as much whitespace between HTML tags as possible and use as few HTML & web controls as possible, the performance should improve somewhat, so I've heard. Does anyone know of a way or DataGrid etc properties to force the HTML code auto-generated by the datagrid to do thisExample of auto-generated HTML of a datagrid:\ttable data 1\ttable data 2\t\ttable data 3\ttable data 4\tchange totable data 1table data 2 table data 3table data 4\t\tAny ideas would be appreciated - changing from a scrollable grid to a page-number grid or forcing a small amount of data to show on the datagrid are not really\toptions that I'd want though.
VIEWS ON THIS POST

436

Posted on:

Tuesday 1st January 2013
View Replies!

Logical Tiers and DataReaders

Ok let me explain what I'm doing (or trying to do).I'm not a system architect so please forgive me if I have the concepts or terminology wrong.I have an n-tier app.\tIt consists of the presentation layer, the business logic layer, the data access layer, and the database.In the database I'm using stored procedures.\tThe database physically sits on a different server from everything else.I have a different assembly (the data access layer) that handles all calls to the db.The code behind files for the aspx pages contain calls to methods within the data access layer to retrieve data for display, etc.Now ... I'm passing data from the DAL in a datareader to the code behind files.\tIs this the best thing to do\tI understand that its better to use a dataset when passing data between tiers because it handles marshaling better.\tIs that a factor when its just logical tiers Also with inter-tier communication the whole chatty / chunky call deal doesn't really apply does it\tThat only becomes an issue when passing data between physical tiersAm I correct or wackoPlease advise
VIEWS ON THIS POST

124

Posted on:

Tuesday 1st January 2013
View Replies!

dialog box

is there a way to make a dialog box appear using asp.net (written using c# and vs2k3) failing that, any ideas how to hash something together that is a bit dialogy ____________________________________________________If you like a post, show you care by giving it a .
VIEWS ON THIS POST

232

Posted on:

Tuesday 1st January 2013
View Replies!

how to make a secure login validation...

Im new to asp.net and need whatever you tips and suggestions I can get. Heres a program that I would like to make but I dont know where to begin. I would like to make a program to keep all the username and password in some kind of secure database and use that to validate if they are an authorized user or not.Heres my scenerio,I would have a regular login screen with a username text and password textbox. When users submit their username and password, I would like asp to take their username, password, and look them up in the database to see if it matches. If it does, then the user will be directed to a member page. However, if the username and password doesn't exist in the database, it will direct the user to a, "sign up to be a member page." I have other questions regarding the sign up page but Ill keep it short for now.Thankx you all in advance.
VIEWS ON THIS POST

183

Posted on:

Tuesday 1st January 2013
View Replies!

Can I get the user login from my Intranet site?

I have been using server variables to get my user's login to our intranet site.\tNow I want to drop the security inside the building and use their windows sign on to authen. them.Now how do I get the logged in user
VIEWS ON THIS POST

136

Posted on:

Tuesday 1st January 2013
View Replies!

search word documents

any idea on something to search through a virtual directory of word (and some excel, but not necessary to search) documents\ti'd also rather not use ms index server.i'm creating an online document management system, and i would rather not keep an index of keywords for each document in the database.\ti'd like to be able to point to a directory and tell it to search through the word documents for a phrase.any suggestions would be much appreciated! mike griffith----------------------------mgriffith@lauren.commdg12@po.cwru.edu
VIEWS ON THIS POST

219

Posted on:

Tuesday 1st January 2013
View Replies!

Serious ASP.NET debugging problem

I have a problem that is really getting on my nerve! I have IIS on 2000 professional..I have ASP.NET..VS.NET.. I have 2 accounts on the computer..Administrator and User1 from Domain Dmn1.. When I log on as Admin I can create a project and debug it smoothly. when I log on as Dmn1/User1 I can create an ASP application but CAN NOT debug it!!!!!!!!...it says "Can not start debugging on server... Access is denied" well DMn1/User1 IS A MEMBER OF VS developers group and DEBUGGER USERS group!!!...it also has FULL control on C:\InetPub...what else should I check\t... I really need help!!.. oh..one more thing to mention...when I add Dmn1/User1 to Administrators group everything works fine!..BUT I DONT WANT TO DO THAT!!!..
VIEWS ON THIS POST

172

Posted on:

Tuesday 1st January 2013
View Replies!

Formating spreadsheet on the fly

I am trying to format a excel spreadsheet on the fly. The data is written to it using a streamwriter. I tried formatting the streamwriter but i can't do much with it. I need to add the header bold, with background color and grid lines to the cells.Can anyone please help me with itMy code:#region "Excel Methods"\t\t\t\tprivate void ExportGridViewToCSV(DataTable dt, string fileName)\t\t\t\t{\t\t\t\t\t\tstring path = HttpContext.Current.Server.MapPath(fileName);\t\t\t\t\t\tStreamWriter sw = new StreamWriter(path, false);\t\t\t\t\t\t\t\t\t\t\t\t// Write the headers.\t\t\t\t\t\tfor (int i = 0; i < dt.Columns.Count; i++)\t\t\t\t\t\t{\t\t\t\t\t\t\t\tsw.Write("\"" + dt.Columns[i] + "\"");\t\t\t\t\t\t\t\tif (i < dt.Columns.Count - 1)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsw.Write(",");\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\tsw.WriteLine();\t\t\t\t\t\t// Write the content.\t\t\t\t\t\tforeach (DataRow row in dt.Rows)\t\t\t\t\t\t{\t\t\t\t\t\t\t\tfor (int j = 0; j < dt.Columns.Count; j++)\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\tif (row[j].ToString().Trim() == " ")\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\tsw.Write("\"" + "" + "\"");\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\telse\t\t\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\tsw.Write("\"" + row[j].ToString().Trim() + "\"");\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\tif (j < dt.Columns.Count - 1)\t\t\t\t\t\t\t\t\t\t\t\tsw.Write(",");\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\tsw.WriteLine();\t\t\t\t\t\t}\t\t\t\t\t\tsw.Close();\t\t\t\t\t\t//var excelFile = new ExcelFile();\t\t\t\t\t\t//var worksheet = excelFile.Worksheets.Add("Worksheet1");\t\t\t\t\t\t//ws.Cells[0, 0].Value = DateTime.Now; // Type is System.DateTime\t\t\t\t\t\t//// Some Font Styles\t\t\t\t\t\t//ws.Cells[0, 0].Style.Font.Color = Color.Blue;\t\t\t\t\t\t//ws.Cells[0, 0].Style.Font.Italic = true;\t\t\t\t\t\t//ws.Cells[0, 0].Style.Font.Name = "Comic Sans MS";\t\t\t\t\t\t//ws.Cells[0, 0].Style.Font.Size = 150;\t\t\t\t\t\t//// Setting border on cell range\t\t\t\t\t\t//var mergedRange = ws.Cells.GetSubrangeAbsolute(0, 0, 10, 5);\t\t\t\t\t\t//var cellStyle = new CellStyle();\t\t\t\t\t\t//cellStyle.Borders.SetBorders(MultipleBorders.Right | MultipleBorders.Top, Color.Black, LineStyle.Thin);\t\t\t\t\t\t//mergedRange.Style = cellStyle;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHttpContext.Current.Response.Clear();\t\t\t\t\t\tHttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" + fileName);\t\t\t\t\t\tHttpContext.Current.Response.ContentType = "text/csv";\t\t\t\t\t\tHttpContext.Current.Response.WriteFile(path);\t\t\t\t\t\tHttpContext.Current.Response.End();\t\t\t\t}\t\t\t\t#endregion\t\t}}
VIEWS ON THIS POST

151

Posted on:

Tuesday 1st January 2013
View Replies!

Change CR image with code

Here's a tricky one. Does anyone have any idea how to change an image on a Crystal Report via codeI have an application that I am building in VS2005 (code behind is vb). I have a report that I want to use code to change the picture based on the recordid. The pictures are stored on a network file.Anybody, somebody, help me please. ProDev, Builders of Affordable Software ApplicationsVisit me at ==> http://www.prodev.usMay God bless you beyond your imagination!!!
VIEWS ON THIS POST

156

Posted on:

Tuesday 1st January 2013
View Replies!

GridView

I've created gridview user control.I fill it with data from xml.Then I load it into default web form to panel, but I don't see it.Why , My code on user control:namespace TxtWeb{\t\tpublic partial class DataGridES : System.Web.UI.UserControl\t\t{\t\t\t\tprotected void Page_Load(object sender, EventArgs e)\t\t\t\t{\t\t\t\t}\t\t\t\tGridView gridData = new GridView ();\t\t\t\tpublic DataSet ds = new DataSet();\t\t\t\tpublic GridView Grid\t\t\t\t{\t\t\t\t\t\tget\t\t\t\t\t\t{\t\t\t\t\t\t\t\treturn gridData;\t\t\t\t\t\t}\t\t\t\t}\t\t\t\tpublic void FillGridWithHTML(string xmlFile)\t\t\t\t{\t\t\t\t\t\tXmlDataDocument xmlDatadoc = new\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tXmlDataDocument();\t\t\t\t\t\txmlDatadoc.DataSet.ReadXml(xmlFile);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tds = xmlDatadoc.DataSet;\t\t\t\t\t\t\t\t\t}\t\t}}My code on Web form:namespace TxtWeb{\t\tpublic partial class _Default : System.Web.UI.Page\t\t{\t\t\t\tprotected void Page_Load(object sender, EventArgs e)\t\t\t\t{\t\t\t\t\t\tstring xmlFile\t\t\t\t\t\t\t\t="C:\\c#\\TestnaAplk\\TestnaAplk\\Podaci.xml";\t\t\t\t\t\tDataGridES dg = new DataGridES();\t\t\t\t\t\tdg.FillGridWithHTML(xmlFile);\t\t\t\t\t\tdg.Grid.DataSource = dg.ds;\t\t\t\t\t\tPanelGrid.Controls.Add(dg); \t\t\t\t}\t\t}} , I tried all that, but I still can't see grid.
VIEWS ON THIS POST

113

Posted on:

Tuesday 1st January 2013
View Replies!

CreateUserWizard CreatingUser Issue

.\tI'm using ASP.NET 2.0 and I have a page that does user registration.\tI've had it all working fine for a while until I noticed a couple things that it wasn't checking.\tIt wasn't checking to see if the email entered was a real email (by format) so I had to use a regularexpression validator to do so, which went fine.\tThe other problem though, is checking the password entered to see if it contains the username entered.\tThus, I would NOT want someone to register with the following info:Username: BobbyJoePassword: BobbyJoe1 (or bobbyjoe1)So by going into the CreatingUser event, I think I've successfully been able to check for the username being in the password and I can call the e.Cancel = true part of it to stop the registration process from continuing, but I can't figure out how to throw up an error about this.\tI've tried using a label or something but nothing seems to work.\tHas anyone else had any similar issues\t
VIEWS ON THIS POST

148

Posted on:

Wednesday 2nd January 2013
View Replies!

Retrieve height of datalist when height not initially set?

I'm trying to dynamically adjust the height of a container div based on the height of a datalist it contains. However, I don't have a default height set for the datalist, the height just flexes based on how many rows are returned. I thought I could just do an body onload statement like this:onload="document.getElementById('detail_div').style.height = document.getElementById('DataList1').height;"but this doesn't return anything. If I explicitly set the\theight of the DataList, then it works fine. How can I find out the height of my DataList if I don't set it when its created
VIEWS ON THIS POST

195

Posted on:

Wednesday 2nd January 2013
View Replies!

ControlState Thoughts

I'm currently using ControlState to pass simple objects between postbacks. Can anyone comment on this approach and some things I might want to considerI don't want to get half way through development and realize that our architecture was a giant flop
VIEWS ON THIS POST

133

Posted on:

Wednesday 2nd January 2013
View Replies!

using HTA with asp.net

I have to do some coding for another company to send automated emails.\tThey insist that instead of using a console app that I use an asp.net web page called from an HTA.\tI'm not familiar with HTA's and searched fruitlessly to find out something relevant.\tCan someone point me in the right direction so I can complete this assignment\t
VIEWS ON THIS POST

212

Posted on:

Wednesday 2nd January 2013
View Replies!

Programmatically selecting values in a list box

I've got a list box on a web form which, when loaded, uses data from a text field in a database to determine which values should be selected. When the user presses save, the selections from the list box should be resaved to the text field.This works fine if the user manually selects items from the list box, but if they don't make any changes and the list box shows just the selected items from the loading code then, when the user tries to resave, the selectedindex of the list box is showing as 0, even though the items are highlighted, so resave doesn't work.Here's the code:CODE'Firstly to select values from the list boxIf Not DataReader.GetValue(119) Is DBNull.Value Then\t\t\t\t\t\t\t\t'firstly get the values\t\t\t\t\t\t\t\tDim fullString As String = DataReader.GetValue(119)\t\t\t\t\t\t\t\t'check if there is a comma separator in the string, if not then there's only one\t\t\t\t\t\t\t\t'value, so use that\t\t\t\t\t\t\t\tIf InStr(fullString, ",") = 0 Then\t\t\t\t\t\t\t\t\t\tMe.AdditionalEmailList.SelectedValue = fullString\t\t\t\t\t\t\t\t'otherwise we need to get each of the values by looping through the string\t\t\t\t\t\t\t\tElse\t\t\t\t\t\t\t\t\t\tDim charPosition As Integer\t\t\t\t\t\t\t\t\t\tDim listName As String\t\t\t\t\t\t\t\t\t\tWhile fullString ""\t\t\t\t\t\t\t\t\t\t\t\tIf InStr(fullString, ",") = 0 Then\t\t\t\t\t\t\t\t\t\t\t\t\t\tcharPosition = fullString.Length\t\t\t\t\t\t\t\t\t\t\t\tElse\t\t\t\t\t\t\t\t\t\t\t\t\t\tcharPosition = fullString.IndexOf(",")\t\t\t\t\t\t\t\t\t\t\t\tEnd If\t\t\t\t\t\t\t\t\t\t\t\tlistName = Left(fullString, charPosition)\t\t\t\t\t\t\t\t\t\t\t\tfullString = fullString.Remove(0, charPosition)\t\t\t\t\t\t\t\t\t\t\t\tIf fullString "" Then\t\t\t\t\t\t\t\t\t\t\t\t\t\tfullString = fullString.Remove(0, 1)\t\t\t\t\t\t\t\t\t\t\t\tEnd If\t\t\t\t\t\t\t\t\t\t\t\t'now we have a name, make sure that name is selected\t\t\t\t\t\t\t\t\t\t\t\tDim item As ListItem = Me.AdditionalEmailList.Items.FindByValue(listName)\t\t\t\t\t\t\t\t\t\t\t\t\t\tIf Not item Is Nothing Then\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\titem.Selected = True\t\t\t\t\t\t\t\t\t\t\t\t\t\tEnd If\t\t\t\t\t\t\t\t\t\tEnd While\t\t\t\t\t\t\t\tEnd If\t\t\t\t\t\tEnd If'now to resave the selected values on the list boxDim entryString As String\t\t\t\t'get the selected values from the list box and concatenate them into one string\t\t\t\t'this is where I get the problem - selectedindex is 0\t\t\t\tIf Me.AdditionalEmailList.SelectedIndex 0 Then\t\t\t\t\t\tDim li As ListItem\t\t\t\t\t\tentryString = ""\t\t\t\t\t\tFor Each li In Me.AdditionalEmailList.Items\t\t\t\t\t\t\t\tIf li.Selected = True Then\t\t\t\t\t\t\t\t\t\tentryString += li.Value + ","\t\t\t\t\t\t\t\tEnd If\t\t\t\t\t\tNext\t\t\t\t\t\t'now remove the final comma\t\t\t\t\t\tDim finalChar As Integer = entryString.Length\t\t\t\t\t\tentryString = entryString.Remove(finalChar - 1, 1)\t\t\t\tEnd I
VIEWS ON THIS POST

137

Posted on:

Wednesday 2nd January 2013
View Replies!

Dropdownbox - Tooltips

I am trying to put a tool tip on a drop downbox.\tThe tooltip property works great in FireFox but not in I.E 6.\t
VIEWS ON THIS POST

110

Posted on:

Wednesday 2nd January 2013
View Replies!

Using Assembly src="" in .vb files

Hi ,Hopefully this is a quickie!A few of the web apps we've built are not compiled, but instead use the directive similar to:in the top of the ASPX page, which relates to a .vb file in the directory with a couple of classes in it.\t(more code at the bottom) Very handy for anyone making small frequent changes, however I was wondering if anyone knows how you could link two .vb files together before they're using in the aspx page.\tEg, we have default.aspx, MyLib.vb and DatabaseLib.vb. I can do in the top of default.aspx so I have the classes/functions of both available in default.aspx, but can I somehow make the functions from DatabaseLib.vb available in MyLib.vb by using a similar methodI guess I could create a new instance of the class(es) in DatabaseLib.vb and pass them into the MyLib classes, but I was hoping there might be something as simple asImports "Databaselib.vb"which I could put in the top of MyLib.vb.Wow, I hope that makes sense!\tBit of a long explanation, hopefully there's a shorter answer! Any help would be much appreciated
VIEWS ON THIS POST

129

Posted on:

Wednesday 2nd January 2013
View Replies!

Problem with adding a reference

.I created a WebService, and a proxy class.Now\tfor a windows application I had to add System.Web as a reference in order to consume the service.It worked, after several tries.Then I tried the same for a PocketPC type of application.I got the following error, eventhough System.Web.Services\twas originally added to the reference.The type 'System.Web.Services.Protocols.SoapHttpClientProtocol' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.\tI compared the solution with the windows application one. I noticed that System.Web.Services in Win App was loaded from the following location C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Services.dll.So I had to make the subsequent changes on that and on System.dll as well.But now, the\tPocketPC application won't work.Furthermore switching back the references to the original location: C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE, didn't fix the problem.Still getting this error: Deployment and/or registration failed with error: 0x8973190e. Error writing file '\Windows\NETCFV2.ppc.armv4.cab'. Error 0x80070070: There is not enough space on the disk.Any ideasThank you.
VIEWS ON THIS POST

158

Posted on:

Wednesday 2nd January 2013
View Replies!

View Email Spool

Is there any way to view the email spool of ASP.Net before it sends them via SMTP
VIEWS ON THIS POST

188

Posted on:

Wednesday 2nd January 2013
View Replies!

display a message in a new window on a button press

Hi ,I have created a web form to collected some information from user and then send the data via a System.Web.Mail.MailMessage on the submit of a button. The question i have is that i also want on the submit of the button to display a message in a new window telling the user some infomation. I am sure this is fairly simple thing todo but seem be gettting a bit stuck.
VIEWS ON THIS POST

156

Posted on:

Wednesday 2nd January 2013
View Replies!

Redirect Issues

I have a C# asp page that needs to record a hit and redirect, but the Javascript isn't executing and the redirect beats the JS execute.CODE\t\t\t\t\t\t\t\t\t\t\t\tRedirect\t\t\t\t\t\t\t\t
VIEWS ON THIS POST

357

Posted on:

Wednesday 2nd January 2013
View Replies!

ListBox Keypress Check .NET 2.0

Is there way to alter the default KeyPress behavior of a ListBox control, so that a continuous character entry will move through the list ( bad explanation.. what I mean is that, by default, when you press a key while focus is on the list items, the list will move to the first entry that starts with that key..What I want to do is continue typing and have the list move to the item that matches all the letters entered ).I have done this in Classic asp and JavaScript ( using\t onkeypress='evalKey()' as part of the
VIEWS ON THIS POST

178

Posted on:

Wednesday 2nd January 2013
View Replies!

hard carriage return

,I am trying to force a carriage return and line feed (vbcrlf) in to a string which will be used for the body part of an email.\tHowever, when I received the message; it appears to me that the body is one continuous long long long string.here is my snipet code CODE\tmailbody = "," & vbcrlf & vbcrlf & "You have selected the following items: " & vbcrlf\tselect case semicode\t\t\tcase "123"\t\t\t\tmailbody = mailbody & "activity 1" & vbcrlf\t\t\t\tmailbody = mailbody & "activity 2" & vbcrlf\t\t\t\tmailbody = mailbody & "activity 3" \t\t\t\t\t\tcase "12"\t\t\t\tmailbody = mailbody & "activity 1" & vbcrlf\t\t\t\tmailbody = mailbody & "activity 2" & vbcrlf\tend selectThe outcome of this was:,You have selected the following items:activity 1activity 2activity3The only way I can line them up in the message was to reside the window down then I can get my altimate result which is,You have selected the following items:activity1activity2activity3If you have any suggestion on why the vbcrlf did not execute (I can be wrong) please let me know or can show me how to line them up
VIEWS ON THIS POST

209

Posted on:

Wednesday 2nd January 2013
View Replies!

How do I force localhost to see a project?

I have been given custody of an existing asp.net application. The previous developer published from his localhost to the production server.\tI physically went onto his localhost and burned the project onto a cd.\tThen I put the project onto my localhost.I tried several times to work with this project.\tBut all of my attempts failed.\tI can give you a detailed account of my attempts.\tBut the bottom line is, I need to know how to get my VS installation and my IIS to interact with this project.\t
VIEWS ON THIS POST

179

Posted on:

Wednesday 2nd January 2013
View Replies!

Dynamic tag???

all,\tI am creating a form by adding controls dynamically.\tOne of my controls is a DataGrid which has about 20 rows.\tIn the past when not creating the form dynamically, I put the grid inside of a tag so that I can have scroll bars to appear.\tI know the tag is HTML, but is there anyway to add it at run time, around my grid, or am I way off here\t
VIEWS ON THIS POST

171

Posted on:

Wednesday 2nd January 2013
View Replies!

Regular Expressions Find Whole word

I am trying to use regular expressions to find colours in a string but red is causing a problem because it is part of other words. My code is:CODERegex RegExp = new Regex("[^a-z](" + colour + ")[^a-z]|(" + colour + ")$",RegexOptions.IgnoreCase);Match MyRegMatch=RegExp.Match(strIn);if(MyRegMatch.Success){Response.Write("Found: "+MyRegMatch + "");}but where strIn = "quartered" it still finds the colour "red" and i don't want it to. How can I stop this happening and only find a match if it's the word red on it's own i love chocolate
VIEWS ON THIS POST

128

Posted on:

Wednesday 2nd January 2013
View Replies!

Does twenty equal null?

I am attempting to make a button that will add a record to a datagrid.\tFor this test, I am using predetermined data.\tMy approach is to add the record to the SQL Server table that supplies data to the datagrid.\tThen I refresh the page.\tIt ALMOST works.\tI get the error "Cannot insert the value NULL into column 'locationid'..." But I am NOT inserting null, I'm inserting twenty!***The table has this layout***description varchar(50)address1 varchar(50)address2 varchar(50)city varchar(50)zip varchar(50)phoneNumber varchar(50)deleted bit [default value=0]locationid bigInt [pk]***My dataadapter's insert command***INSERT INTO dbo.audit_location (description, address1, address2, city, zip, phoneNumber, deleted, locationid) VALUES (@description, @address1, @address2, @city, @zip, @phoneNumber, @deleted, @locationid)****The parameters from the webform's load event****\t\t\t\tMe.SqlInsertCommand1.Connection = Me.SqlConnection1\t\t\t\tMe.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@description", System.Data.SqlDbType.VarChar, 50, "description"))\t\t\t\tMe.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@address1", System.Data.SqlDbType.VarChar, 50, "address1"))\t\t\t\tMe.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@address2", System.Data.SqlDbType.VarChar, 50, "address2"))\t\t\t\tMe.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@city", System.Data.SqlDbType.VarChar, 50, "city"))\t\t\t\tMe.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@zip", System.Data.SqlDbType.VarChar, 50, "zip"))\t\t\t\tMe.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@phoneNumber", System.Data.SqlDbType.VarChar, 50, "phoneNumber"))\t\t\t\tMe.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@deleted", System.Data.SqlDbType.Bit, 1, "deleted"))\t\t\t\tMe.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@locationid", System.Data.SqlDbType.BigInt, 8, "locationid"))***And finally, the function that does the update***Function addDataGridRow()\t\t\t\tSqlDataAdapter1.InsertCommand.Parameters("@description").Value = "testDescription"\t\t\t\tSqlDataAdapter1.InsertCommand.Parameters("@address1").Value = "testAddr1"\t\t\t\tSqlDataAdapter1.InsertCommand.Parameters("@address2").Value = "testAddr2"\t\t\t\tSqlDataAdapter1.InsertCommand.Parameters("@city").Value = "testCity"\t\t\t\tSqlDataAdapter1.InsertCommand.Parameters("@zip").Value = "testZip"\t\t\t\tSqlDataAdapter1.InsertCommand.Parameters("@phoneNumber").Value = "testPhoneNumber"\t\t\t\tSqlDataAdapter1.InsertCommand.Parameters("@deleted").Value = 0\t\t\t\tSqlDataAdapter1.InsertCommand.Parameters("@locationid").Value = 20\t\t\t\tSqlConnection1.Open()\t\t\t\tSqlDataAdapter1.InsertCommand.ExecuteNonQuery()\t\t\t\tSqlConnection1.Close()\t\t\t\tDataSet11.Clear()\t\t\t\tSqlDataAdapter1.Fill(DataSet11)\t\t\t\tDataGrid1.DataBind()\t\tEnd Function
VIEWS ON THIS POST

113

Posted on:

Wednesday 2nd January 2013
View Replies!

Parameter problem

Hi ,I'm having a bit of a nightmare with using parameters for updating a record within my database. It keeps throwing the following error"Parameter @desc has no default value"The code that deals with the parameters is as follows:CODEsSQL = "UPDATE req SET strReqNo=@reqno, fkContractID=@contractid, strDescription=@desc, intValue=@value, intCostPlus=@costplus, strDesignBy=@desby, dteIssue=@isson, strIssueBy=@issby WHERE pkJobCardNo=@jcno"\t\t\t\tcmd = New System.Data.OleDb.OleDbCommand(sSQL, dbcon)dba.UpdateCommand = cmdcmd.Parameters.Add("@jcno", OleDb.OleDbType.Integer).Value = jcnocmd.Parameters.Add("@reqno", OleDb.OleDbType.Char).Value = reqnocmd.Parameters.Add("@contractid", OleDb.OleDbType.Integer).Value = textcmd.Parameters.Add("@desc", OleDb.OleDbType.Char).Value = desccmd.Parameters.Add("@value", OleDb.OleDbType.Currency).Value = valuecmd.Parameters.Add("@costplus", OleDb.OleDbType.Currency).Value = costpluscmd.Parameters.Add("@desby", OleDb.OleDbType.Char).Value = desbycmd.Parameters.Add("@isson", OleDb.OleDbType.Char).Value = issoncmd.Parameters.Add("@issby", OleDb.OleDbType.Char).Value = issbydbcon.Open()cmd.ExecuteNonQuery()dbcon.Close()I've google'd and searched the forums but nothing seems to solve this problem. The variables assigned are set by textbox's and are all correct according to traces. I have an\tinsert statement which runs off the same parameters which runs fine. I'm totally puzzled, any suggestions welcome.
VIEWS ON THIS POST

175

Posted on:

Wednesday 2nd January 2013
View Replies!

Refer parent function in custom control???

i want to build a custom control that has a overridable function. This function can be overridden by the implementing page.e.g.:.ascx file has this functionpublic overridable FunctionName() as booleanend functionin .aspx i need to be able to override this function. like so:overrides FunctionName() as booleanresponse.write("Yeah!!!")end functionbut since the aspx file inhertis from page it is unable to override the custom control function.Can this be done\t I am open to other suggestions for implementing the same functionality... Known is handfull, Unknown is worldfull
VIEWS ON THIS POST

175

Posted on:

Wednesday 2nd January 2013
View Replies!

newbie to asp .net

I am new to asp .net and I want to program a web based application that will do the following:1.\tow users to login and select from a standard set of database fields to customize a registration page.2.\tCreate the database connection file3.\tCreate the web form dynamically to what the user has selected to each user could have a customzied login/registration page.I have no clue how to do this, can anyone point me in the right direction to be able to do this.\tI have visual studio .net 2003 at my disposal.\tAre there any good books or websites I should look at
VIEWS ON THIS POST

148

Posted on:

Wednesday 2nd January 2013
View Replies!

deleting from datalist

hallo,I have a datalist that doesn't display the id number of each item. I don't know how to refer to the id to delete items. I tried to refer to the DataKeyField but I get an error BC30456: DAtaKeyField is not a member of System.Web.UI.Webcontrols.DataListItem.The code I use for the deletecommand and the datalist is this:CODESub Datalist1_DeleteCommand(ByVal obj As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles DataList1.DeleteCommand\t\t\t\tDim strSQL As String = "DELETE * FROM tbl_messages " & _\t\t\t\t\t"WHERE mes_id = " & e.Item.DataKeyField & ";"\t\t\t\t\t\t\tExecuteStatement(strSQL)\t\t\t\t\t\t\tFillDataList()\t\tEnd Sub......
VIEWS ON THIS POST

82

Posted on:

Wednesday 2nd January 2013
View Replies!

How many layers are best practice?

I occasionaly, while being in a deep "flow" of programming, run into these mind-design-problems, which i seem to forget but today i wrote one down. Suppose you have an item class, an item collection class, a dataclass (which fills the collection class with items stored in a database or flat file) and an e.g. "weblog" classto fill a collection you could instantiate the collection class in the weblog class as well as instantiate the dataclass in the weblogclass and fill it in the weblog class. In this way the collection class does not have to have a method called "fillme", which could be called to fill the collection class.On the other hand if the collection class would have a method called fillme it would make the weblog class much more simple since you would simply have to call something like weblogitemcollection.fillme and it would be filled... nog direct access needed to a dataclass whatsoever but... the single classes would be not so reusable since this specific dataclass in the collection class would always be needed.So you would have always have a item.cs, collection.cs, data.cs and weblogs.cs but the way you would call each other\tand which methods to include in each of these classes, in other words, the relations they have would differ.Another way would be to include an extra class, something like collectiondata.cs which would enable collection.cs to call something generic in collectiondata.cs to call data.cs.Which is the best way according to best practices -- http://leau.net
VIEWS ON THIS POST

281

Posted on:

Wednesday 2nd January 2013
View Replies!

excel cell format " " doesn't display in datagrid for dates and number

Loomah,\tused your code to figure out that the Access database is not accepting values with cell values "".\tIf I change the "" to " ", it works.\tHowever, I have to do this manually in each cell to make sure they're all " ".\tI've tried Killian's code to format the entire region with the following:\t\tRange("A1:BA15").Select\t\tSet myRange = Selection\t\tFor Each Cell In myRange\t\tIf IsEmpty(Cell.Value) Then\t\t\t\tCell.Value = " "\t\tEnd If\t\tNextThis will format all the cells with "" to " ".\tThe text, date, and number formatted cells are all intact in excel.\tHowever, once I import it into an asp.net datagrid, the date and number cells are blank, while the text cells are present.\tIs the code above somehow formatting these cells and causing them not to be displayed in the datagridI've also posted this in VBA Visual Basic for Applications (Microsoft) Forum forum.
VIEWS ON THIS POST

164

Posted on:

Wednesday 2nd January 2013
View Replies!

Datagrid not refreshing after postback

hi, i have a DataGrid that's bound to a table within an untyped DataSet.\tduring the application's use, the table has rows added, updated, deleted, etc which is handled by a method in the page's code behind. after the method executes the page reloads.\tmy Page_Load handler explicitely states that it should be rebuilding the DataGrid regardless of the page being a postback or not since the display information in the datagrid isn't part of the viewstate.\tfine.\tnow, if i *refresh* the page (F5), the datagrid shows correctly.\ti've checked the dataset and it's table to see if there's any difference in content for after method execution and refresh:\tthey're identical.\ti've also verified that my methods that rebuild the DataGrid are called after the data has been changed.\tso that being said, why is the new content being ignoredshould i register a StartUpScript to force the form to submit\t(i tested this and this does work, but there's gotta be a better way than making two trips to the server for a refresh).\tfor what it's worth, the datagrid is built with nearly all custom template columns. toy code belowCODEvoid Page_Load(object sender, System.EventArgs e){\tif(!Page.isPostBack){\t\t/* build the initial dataset & save it to a Session\t\t\t* var for later use... */\t}\tbuildDataGrid();}void buildDataGrid(){\t//build & populate the datagrid}//called by a control in DataGrid, e.g. btn, ddl, cbx, etcvoid aDataGridEvtHander(object sender, System.EventArgs e){\t/* update a table in the dataset & save DataSet back to\t* the Session var */}any thoughts\tthanks in advance... ..:: mirirom ::.. , hey again Atomic, i totally stand corrected; was reading the trace wrong!\tyour're completely right about the order of ops here where Page_Load is being called prior to the handler from the DataGrid.\tthanks!\ti've added a myGrid.DataBind() method in the control's event handler to refresh before rendering.\t ..:: mirirom ::..
VIEWS ON THIS POST

149

Posted on:

Wednesday 2nd January 2013
View Replies!

Code Behind Server

can anybody recomend a free server where i can test my aspx pages i need one with access to the bin directory for code behind. ____________________________________________________If you like a post, show you care by giving it a .
VIEWS ON THIS POST

111

Posted on:

Wednesday 2nd January 2013
View Replies!

Upgraded one ASP page to ASP.Net now debugger wont stop at any line...

I upgraded my second ASP page to ASP.Net..yes a newbie..now when I set the debugger at ANY line..even first line..it wont stop there....the page however does get displayed...To make sure I'm setting the debugger at the right page..i made a "text" change to the page..and it does display the aspx page....I get no errors...howcome debugger wont stop there\t even tho the page displays, some of the session vars arent set for the next page..so wondering what's going on\tWhen I try the old ASP page..debugger DOES stop on that pageAny ideas, leads, what to look for
VIEWS ON THIS POST

70

Posted on:

Wednesday 2nd January 2013
View Replies!

Printing to Web Server Printer

I'm developing a small web app that takes the users name from a web form and prints it out to a label printer.My problem is that I don't know how to go about printing.\tI do not want to print the web form just the data that the user has entered.\tThe printer is a special label printer but it will be connected from the web server so no client side code needed.I don't know if I should capture the information to a file and then print or ir it can be printed directly.TIAMarc
VIEWS ON THIS POST

86

Posted on:

Wednesday 2nd January 2013
View Replies!

cookie problem

got a protected page that upon successful login, the user is greeted with their name and expiration date.\tthat is expiration date of service, not their personal date of demise.\ti hope.\tpoor humor if any at all.anyway, it works fine for most systems.\ti simply put the name and date on a cookie value and display it to them using a label.\tbut i have one user that complained of a runtime error.\ti do have 3 machines, and wouldn't you know, on one of those machines i get a runtime error.\t"object not set to an instance of an object".\ti am wondering if it has something to do with how each browser is set up for cookies.\tthe machine of mine that is giving this error does accept cookies.\tso i am lost.\tany help appreciated
VIEWS ON THIS POST

99

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

118

Posted on:

Wednesday 2nd January 2013
View Replies!

Aggravatingly Annoying IDE quirk

I was hoping that someone out there has had this problem.Whenever I switch from the code view back to the design view in VS.Net I have to wait a couple seconds before I can do anything.\tIt's almost like the IDE is building the design view all over again from code or something I am not sure.This is rather annoying as I am constantly switching back and forth and having to wait each time for VS to do it's thing.I am running a XP Pro box on an Intel III 750 w/ 256M of RAM.You comments are appreciated. That'l do donkey, that'l do Mark
VIEWS ON THIS POST

72

Posted on:

Wednesday 2nd January 2013
View Replies!

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 newasp.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....
VIEWS ON THIS POST

386

Posted on:

Wednesday 2nd January 2013
View Replies!