Regexp in Validation Control


gang,

I need to write a regexp for a validation control that will display the error message when it finds
No Client Selected
in the value.

I have absolutly NO experience with regexp, and the opensource/php crowd doesn't seem very warm to us microsoft marks.
;)

anybody know off hand how I could write this
Posted On: Wednesday 2nd of January 2013 02:29:52 AM Total Views:  317
View Complete with Replies

RELATED TOPICS OF ASP.NET PROGRAMMING LANGUAGE




Embed webpage

how to embed a webpage in another webpage using asp.net 2.0
VIEWS ON THIS POST

115

Posted on:

Friday 16th November 2012
View Replies!

Anyone Know of a Provider For Making Regular Payments to Clients Bank

I am wondering if anyone can point me in the direction of a suitable provider who will let me make regular payments to clients bank accounts, ideally using an API. Ideally I would like to be ablew to add a user, along with their bank account details to an external provider (preferably through code and an API) Ideally I would then be able to make regular payments to my clients using this provider (again preferably through code and an API) I don't think PayPal would fit the bill as you can only make payments to peoples Paypal accounts. I am looking for something more enterprise level. I am looking to pay many clients all at the same time. Basically, a similar idea to how quidco.com must pay their customers every month if they have earned cashback.
VIEWS ON THIS POST

136

Posted on:

Friday 16th November 2012
View Replies!

sing IF statement with conditional operators

, I've wrote this piece of code, basically if my product stock is "3" and the customers tries to order "10" there will be a error message, and the buy now button won't be be enabled. If the customer does order below the number available then buy now button will be enabled and there will be no error message. If DropDownList1.SelectedItem.Text > lbloutofstock.Text Then Button1.Enabled = False Button2.Enabled = False lbloutofstock.Visible = True lbloutofstock.Text = "*We have only " & lblStock.Text & " remaining!" Else Button1.Enabled = True Button2.Enabled = True lbloutofstock.Visible = False End If If lblStock.Text = "0" Then Button1.Text = "Item is sold out" Button2.Visible = False Button1.Width = 200 End If Problem is the code always shows the error message, i've looked through the code and can't find any visible errors. I've tried different conditional operators to no avail.
VIEWS ON THIS POST

126

Posted on:

Monday 19th November 2012
View Replies!

Getting started with ASP.net

I want to make a small page that can get inventory and pricing from an XML file and update various parts of a page. I don't need to do sale pricing or anything like that just a list. Maybe have a dynamic date or small list (random say 5 items from the XML). I have worked in C# before but I just have no idea where to start with this. If I set my ASP.NET project as .NET 3.5 does that mean the user needs 3.5 to be able to view the page
VIEWS ON THIS POST

122

Posted on:

Friday 23rd November 2012
View Replies!

[ASP] SQL 'WHERE' Statement

I've been working on a game and after you login I need the server to check for characters this user has. I ran through the whole document and this is the snippet the errors are coming from. ID represents the user's ID which in the Acc column and tells the code which character belongs to which user. I've looked through lots of tutorials and I can't find the error. And Yes I did define the variable. TIA. This post has been edited by Glorfindal: 16 March 2010 - 04:47 AM
VIEWS ON THIS POST

134

Posted on:

Saturday 24th November 2012
View Replies!

The problem is cannot get the value from dropdownlist

I have declared DropDownList d; DropDownList dr; as globally My main problem is that i can not get the seleted value of dropdownlist .I want to insert it in database .I am creating dynamically dropdownlist IN first button i have successfully created dynamic number of dropdownlist with help textbox1 and button1. But while insertion through button 2 i do not get the value dropdownlsit dr = new DropDownList(); dr = (DropDownList)(Panel3.FindControl(str)); //Label la = new Label(); //la.ID = "la" + i; //LiteralControl lit = new LiteralControl(""); value = dr.SelectedValue.ToString(); protected void Button1_Click(object sender, EventArgs e) { int a = Convert.ToInt32(TextBox1.Text); try { for (int i = 0; i < a; i++) { d = new DropDownList(); d.ID = "Text" + i; LiteralControl l1 = new LiteralControl(""); d.Items.Add("Rahul"); d.Items.Add("Gautum"); d.Items.Add("anant"); //Session[""+i]=i; //Session["current"] = i; //Session["Product" + i] = d; //Session["id" + i] = d.ID; //Session["seleted" + i] = d.SelectedValue.ToString(); //d.SelectedIndexChanged += new EventHandler(d_SelectedIndexChanged); //string st = "select doe_name from Doe_detail "; //SqlCommand cmd = new SqlCommand(st, con1); //SqlDataReader dr = cmd.ExecuteReader(); //while (dr.Read()) //{ // d.Items.Add(dr.GetString(0).ToString()); //} Panel3.Controls.Add(d); Panel3.Controls.Add(l1); } } catch (Exception e1) { Label4.Text = "" + e1.Message.ToString(); } } void d_SelectedIndexChanged(object sender, EventArgs e) { int i; i = (int)Session["current"]; dr = (DropDownList)Session["Product" + i]; dr.ID = (String)Session["id" + i]; Session["seleted" + i] = d.SelectedValue.ToString(); ; } protected void Button2_Click(object sender, EventArgs e) { int a = Convert.ToInt32(TextBox1.Text); string value = ""; for (int i = 0; i < a; i++) { string str ="Text" + i; dr = new DropDownList(); dr = (DropDownList)(Panel3.FindControl(str)); //Label la = new Label(); //la.ID = "la" + i; //LiteralControl lit = new LiteralControl(""); value = dr.SelectedValue.ToString(); //value = d.SelectedValue.ToString(); //DropDownList d = new DropDownList(); //dr = new DropDownList(); //dr = (DropDownList)Session["Productid" + i]; //dr.ID = "Text" + i; //dr = (DropDownList)Session["Product" + i]; //dr.ID = (String)Session["id" + i]; //dr = (DropDownList)this.Page.FindControl("Text" + i); //value = dr.SelectedValue.ToString(); //value = dr.SelectedValue.ToString(); ; //value = dr.SelectedValue(); SqlConnection con = new SqlConnection("Data Source=ABC-0D78787890A;Initial Catalog=Amit;Integrated Security=True"); con.Open(); SqlCommand cmd1 = new SqlCommand("insert into niitstud values('" + value + "')", con); cmd1.ExecuteNonQuery(); con.Close(); //Panel3.Controls.Add(la); //Panel3.Controls.Add(lit); } }
VIEWS ON THIS POST

189

Posted on:

Saturday 24th November 2012
View Replies!

How to get specific data in sql

how is command for get the specific data such as price in the table in where the condition is the name and insert into the textbox. i want this data for the calculation. anyone can show the example coding will helpful.
VIEWS ON THIS POST

128

Posted on:

Saturday 24th November 2012
View Replies!

The underlying connection was closed: An unexpected error occurred on

I have been trawling the internet to resolve this issue and all the offerings and suggestions have been quite futile. I am doing is getting an xml document from an external website and wishing to load it into an xml document. It is at this stage when the xmlUri is being loaded into the xml document that I get the error: "The underlying connection was closed: An unexpected error occurred on a receive." This has just started happening as the website has been up and runing quite happily for 2 years. Here is my code: string xmlUri = "http://www.ipoker.com/resources/networkinfo.xml"; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(xmlUri); //error occurs here XmlNode activePlayersNode = xmlDoc.SelectSingleNode("//onlineplayers"); I have tried inserting the override GetWebRequest(Uri uri) to Refernce.cs but to no avail. I have also turned off the HTTPKeep-Alives off in IIS but then no website will load. Any ideas You can view the xml I wish to load into my object by entering http://www.ipoker.co...networkinfo.xml into a browser.
VIEWS ON THIS POST

297

Posted on:

Saturday 24th November 2012
View Replies!

Retrieving multiple data from session variable

Currently, I'm storing multiple values into a session. (using listbox) I'm using those data to pull data from database (values in session is used in WHERE statement) I'm not quite sure how to retrieve data from session value so that I can use it in sql statement. Can you help me I'm posting code and display page code Session["genderList"] = genderList.Text; Session["hairList"] = hairList.Text; Session["eyeList"] = eyeList.Text; List selectedItems = new List(); foreach (ListItem item in this.state.Items) { if (item.Selected) selectedItems.Add(item); } Session.Add("state", selectedItems); Response.Redirect("search_result.aspx"); Below code is for display page (Just the sql code) This post has been edited by kmc10314: 21 September 2010 - 11:07 AM
VIEWS ON THIS POST

250

Posted on:

Saturday 24th November 2012
View Replies!

Using Winsock within Web Service !!!

Hi Guys,\t\tI would like to know your thoughts on using Winsock control within web services. I 'm unable to justify how this is going to work and therefore, i would like to have your guidance here (or is there any link that talks about this).\t\tWe are in need to migrate an existing VB 6.0 application that makes use of winsock control to communicate to the server with raw string data. My boss wants to have this application ported to .NET as quickly as possible along with a constraint that we are going with Web service (so as to be used from other application) and using winsock within it.
VIEWS ON THIS POST

116

Posted on:

Sunday 25th November 2012
View Replies!

Session Values are lost

I am facing this strange problem of the session variables lost while in production environment.I do have a entry in the event Viewer in the saying that :aspnet_wp.exe (PID: 2284) was recycled because memory consumption exceeded the 613 MB (60 percent of available RAM). How do i over come this issue, it causing lot of trouble in the production environment.Please help.Jai
VIEWS ON THIS POST

121

Posted on:

Sunday 25th November 2012
View Replies!

convert from 2003 to 2005 problems? can't load this type

Last summer I created a program using ASP.net 1.1 and VB.net2003. This summer I have converted it to 2.0 and 2005 (respectively). I have the program running on my local machine. It builds fine and works just as it should, but when I put it on the server on the network, it gives me errors. I have corrected some of them, but now I get this error about it not being able to load type 'y.y' I've looked around and some people talk about having the correct .NET framework or ASP version on the server or something. How do I check about that and could that be a cause There are many other programs that use the older versions that still need the older versions on the server. Am I correct in saying that So, I'm wondering if it is okay to have all of the versions running on the same server. I've also seen stuff on having the dll file copied to the bin folder of the directory of the file. When I build the program, no dll is created or I can't find it. Where is it supposed to be Sorry if this doesn't make much sense, but basically I am asking how I can fix the error about not being able to load this type.
VIEWS ON THIS POST

186

Posted on:

Sunday 25th November 2012
View Replies!

WebSite Administration Tool? Where is it? (RESOLVED)

Hi all,I'm completely new to ASP.net so thought I'd try a few tutorials. I can't seem to find the Website Administration Tool anywhere. Can anyone help I have VS2005 and SQL Server 2005. I've followed the demo and used the aspnet_regsql.exe tool to create my aspnetdb database. Next in the video it demo's the Website Administration Tool but I can't find it anywhere.The video demo I am following is episode 1 from the code room:www.thecoderoom.co
VIEWS ON THIS POST

99

Posted on:

Sunday 25th November 2012
View Replies!

[resolved]Auto Trim on Listbox.Item.text

I have a formated string that I am placing into a listbox. The formated string could possibly contain numerous repeating spaces ... ( " " ). When i place this in the listbox it automatically trims the text and only will allow one space (" ") imbetween a character. Is there a property on the listbox i can turn off to allow multiple spaces\t Any other suggestion would be appreciated,
VIEWS ON THIS POST

129

Posted on:

Sunday 25th November 2012
View Replies!

Just want to Delete a record from a database

I can't figure this out. I've been trying this for days and don't know what to do at all. I'm usingVisual Studio 2003, programming in Visual Basic.net side to make an ASP Application.Also, I'm not using the straight coding that I find everywhere with databases. I'm using the featurethat the software says works which is dragging and dropping the database objects from the toolboxto the webform. (I think it's called dao, but not sure)The Update and Insert work fine, but the Delete sucks. what's odd is that it worked for one record,but when I wanted it to delete any other record, it gives errors.Here's the code used for Deleting----------------------------------------------------------\t\tPublic Function DeleteAccount(ByVal Name As String) As Boolean\t\t\t\t' Delete an account \t\t\t\tIf Name = "" Then Return False\t\t\t\tDim acct As Account ' This is an AccountSet from the AccountAdapter\t\t\t\tacct = GetAccount(Name) ' This loads the current record from the database\t\t\t\tIf acct.account.Count > 0 Then\t\t\t\t\t\t' account found\t\t\t\t\t\tacct.account(0).Delete()\t\t\t\t\t\tAccountSystem.Update(acct)\t\t\t\tEnd If\t\t\t\tReturn True\t\tEnd Function----------------------------------------------------------The above function worked for one record, but when I asked to do it again, it didn't work anymore.Below is a sample Update function that works for updating but the procedure I used for it didn't evenwork for the delete part. ----------------------------------------------------------\t\tPrivate Function UpdateLastLogin(ByVal Username As String) As Boolean\t\t\t\tDim Data As String\t\t\t\tData = "UPDATE Account SET LastLogin = '" & Now & "' WHERE username = '" & Username & "'"\t\t\t\tAccountSystem.InsertCommand.CommandText = Data\t\t\t\tAccountSystem.InsertCommand.Connection.Open()\t\t\t\tAccountSystem.InsertCommand.ExecuteNonQuery()\t\t\t\tAccountSystem.InsertCommand.Connection.Close()\t\t\t\tReturn True\t\tEnd Function----------------------------------------------------------For some reason, when I create the DataAdapter (drag and dropping it on the webform) I can do the"Configure Data Adapter" to get the wizard. When done with it, the Update and Delete commandscome back with an error about not being created. Only the Insert and Select work. What's up with that\tanyways, here's the error message I get with the delete function===========================System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: ExecuteReader: CommandText property has not been initialized at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable) at System.Data.Common.DbDataAdapter.Update(DataSet dataSet) at SecureXML.Service1.DeleteAccount(String Name, String Key) --- End of inner exception stack trace --- ===========================Can anyone help me with this\t\t or if reluctant on advice, maybe just a website that shows the graphicaldrag and drop creating of a database I can't find ANYTHING.ThxRyan
VIEWS ON THIS POST

104

Posted on:

Sunday 25th November 2012
View Replies!

how to pass the data in hidden field

hi i want to know about pass the data in hidden field you had any refference for it. rpkaran
VIEWS ON THIS POST

138

Posted on:

Monday 26th November 2012
View Replies!

Get client's machine name

How do I get user's machine name from aspx pageThank you,Rushdi
VIEWS ON THIS POST

100

Posted on:

Monday 26th November 2012
View Replies!

how to add calendar control in asp.net

vb.net coding: Imports System.Data.OleDb Imports System.Data Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then ' Generates report for current year lblCalendar.Text = "" Dim horizontalRepeat As Integer = 3 ' number of months in horizontal direction Dim month As Integer For month = 1 To 12 If (month Mod horizontalRepeat = 1) Then lblCalendar.Text += "" End If lblCalendar.Text += "" + generateCalendar(month, 2007) + "" If (month Mod horizontalRepeat = 0) Then lblCalendar.Text += "" End If Next lblCalendar.Text += "" End If End Sub Private Function generateCalendar(ByVal month As Integer, ByVal year As Integer) As String ' generates the calendar as per the booking status Dim wholeCalendar(5, 6) As Integer Dim weeks As Integer = 0 Dim day As String = "" Dim tmpDate As DateTime Dim myDate As Integer For myDate = 1 To 31 Try tmpDate = New DateTime(year, month, myDate) If (day = "Saturday") Then weeks += 1 End If day = tmpDate.DayOfWeek.ToString() If (day = "Sunday") Then 'If (wholeCalendar(weeks, 0) > 0) Then weeks += 1 wholeCalendar(weeks, 0) = myDate ElseIf (day = "Monday") Then 'If (wholeCalendar(weeks, 1) > 0) Then weeks += 1 wholeCalendar(weeks, 1) = myDate ElseIf (day = "Tuesday") Then 'If (wholeCalendar(weeks, 2) > 0) Then weeks += 1 wholeCalendar(weeks, 2) = myDate ElseIf (day = "Wednesday") Then 'If (wholeCalendar(weeks, 3) > 0) Then weeks += 1 wholeCalendar(weeks, 3) = myDate ElseIf (day = "Thursday") Then 'If (wholeCalendar(weeks, 4) > 0) Then weeks += 1 wholeCalendar(weeks, 4) = myDate ElseIf (day = "Friday") Then 'If (wholeCalendar(weeks, 5) > 0) Then weeks += 1 wholeCalendar(weeks, 5) = myDate ElseIf (day = "Saturday") Then 'If (wholeCalendar(weeks, 6) > 0) Then weeks += 1 wholeCalendar(weeks, 6) = myDate End If Catch ex As Exception Exit For End Try Next ' Generates the HTML calendar Dim htmlCalendar As String = "" Dim objEventsDAO As New EventsDAO() Dim dt As DataTable Dim i As Integer, j As Integer htmlCalendar += "" htmlCalendar += "" + getMonthName(month) + " " + year.ToString() + "" htmlCalendar += " Sun Mon Tue Wed Thu Fri Sat " For i = 0 To 5 htmlCalendar += "" For j = 0 To 6 If wholeCalendar(i, j) > 0 Then dt = objEventsDAO.GetEvent(wholeCalendar(i, j), month, year) If (dt.Rows.Count > 0) Then Dim toolTip As String = dt.Rows(0)("Event").ToString() htmlCalendar += "" + wholeCalendar(i, j).ToString() + "" Else htmlCalendar += "" + wholeCalendar(i, j).ToString() + "" End If Else htmlCalendar += " " End If Next htmlCalendar += "" Next htmlCalendar += "" ' Close database connection objEventsDAO.CloseConnection() ' returns the generated HTML calendar Return htmlCalendar End Function Private Function getMonthName(ByVal month As Integer) As String Dim months() As String = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"} Return months(month - 1) End Function End Class
VIEWS ON THIS POST

143

Posted on:

Monday 26th November 2012
View Replies!

How do I alert server side code to browser window resize?

I have an image and a background image I want to display in the browser using server side code. I want the image height to just fit in the browser window, and I want the images to be resized as the browser window is resized. Is there a way to do that I'm using master pages, if that makes a difference. I'm currently calling a separate file to return the browser's initial size, but I don't how how to detect when the browser is resized Diane
VIEWS ON THIS POST

125

Posted on:

Monday 26th November 2012
View Replies!

Open Source Payroll In ASP.Net, need UI design

I am developing an open source ASP.Net 2.0 in Payroll. It will be free as in "free beer" (I decided a complete ASP.Net ERP system will be my contribution to the open source community, Payroll to be the first module). But the problem is I have no idea of what it will look like, so designers please help me. In return, you will be the first one to have a copy of the beta version, and a credit to the About Us page.
VIEWS ON THIS POST

135

Posted on:

Tuesday 27th November 2012
View Replies!

Dynamic Asp.net Table Cells Disappering

I am trying to add cells from the code behind to an asp.net table. When I debug this I see that the first cell is added fine and when it hits the next add dtCell.Text = .Item(0) Me.Table2.Rows(1).Cells.Add(dtCell) the previous cells that were added are no longer there. Is there a workaround for this I am using a asp.net table since I need to display data in vertical columns and cannot use the gridview since it displays horiziontal Does anyone know of a better way to display data in verticall columns besides a html table and populate from a datatable I found some datagrid work arounds where it rearranges the data, but you cannot format the grid. 'dt = datatable can be 0 - xxx rows Dim x As Integer Dim dtCell As New TableCell dtCell.Text = "" Do Until x = dt.Rows.Count With dt.Rows(x) Me.Table2.Rows(0).Cells.Add(dtCell) dtCell.Text = .Item(0) Me.Table2.Rows(1).Cells.Add(dtCell) dtCell.Text = .Item(1) Me.Table2.Rows(2).Cells.Add(dtCell) End With x = x + 1 Loop
VIEWS ON THIS POST

233

Posted on:

Tuesday 27th November 2012
View Replies!

Publishing compiled site

I have a site that I need to make a change to.\tThe code behind is not deployed to the live site.\tI have published the development website (using vs2005) and copied the .dll's to the live site.\tBut the changes that I have made on the development site are not on the live site.\tCan anyone assist and shed light on what I may have done wrong
VIEWS ON THIS POST

157

Posted on:

Tuesday 27th November 2012
View Replies!

Menu title clickable no Entire Menu Item

I have a menu using site map in .net 2003. I have a menu named "Reports".\tThis menu only works if the word Reports is clicked on.\tThere is a lot of blank space next to this menu item which the user is clicking on.\tThe user says the menu item does not work if you do not click on the word Reports.\tHow can I make the whole menu item selectable. I am formating the menu with CSS.(menuPopupItemHover,menuPopupItem)
VIEWS ON THIS POST

93

Posted on:

Tuesday 27th November 2012
View Replies!

how to encrypt web.config file

1-This might be a simple question but I do not know what to do here. I am trying to encrypt my web.config file connection string and I go this code..Do I just need to replace "/MyApplication"\twith one of my aspx pages like if I have yosef.aspx then I should replace it with that or do i have to do some thing else2-So, if I use on of my aspx page to replace it, will my web.config file will be encryptedFor example, the following command encrypts the section of the Web.config file for an application named MyApplication.aspnet_regiis -pe "connectionStrings" -app "/MyApplication"
VIEWS ON THIS POST

256

Posted on:

Tuesday 27th November 2012
View Replies!

Passing a parameter to sqldatasource with type stored procedure

--------------------------------------------------------------------------------I am developing a webpage using Visual Web Developer Express. I have created a GridView linked to a stored procedure in an SQL Database that takes one parameter. I have tested it using a default valued for the parameter and it works fine. However, i need to pass the current logged in username as an input parameter. I have looked around and all example are for passing parameters to the select command but nothing that i found works for stored procedures.I know how to get the username, but i dont know how to pass it to the stored procedure i'm calling with sqldatasource.Cheers, M.
VIEWS ON THIS POST

223

Posted on:

Tuesday 27th November 2012
View Replies!

I need a DataGrid in a ASPX Application (VS2003)

Hi I'm looking for an alternative to the VS2003 ASP.NET delivered DataGrid. The grid works fine but, I find that the format control is poor.What ASPX Data Grid would you recommendDavid Knight
VIEWS ON THIS POST

152

Posted on:

Tuesday 27th November 2012
View Replies!

Include File Equivalent in ASP.NET

hi.\tIn classic ASP, include files were used for content that would allow you to store content in one file that could simply be "included" in other files that needed the same content.\tAn example would be navigation bars, shared components, etc.\tI know there are these "server controls" in ASP.NET which are supposed to be similar to include files, but what about files which hold just mainly content things and components that are not functional\tIs there anything in ASP.NET that does the equivalent without being for the purpose of building functional components\tOr do you just have to put the same code on every page in ASP.NET\tWith classic ASP, whenever a change needed to be made to, say, a navigation, it was so easy just to open one file and do it in that file.\tNow, with ASP.NET, if you have to make a change, you would have to open every file that common component was on and make the change if there is no equivalent.\tWill someone please help me out on this\tThank you.by the way, I am using VB.NET.
VIEWS ON THIS POST

221

Posted on:

Tuesday 27th November 2012
View Replies!

Login page appears in all frames instead of on its own page

\tAnyone heard of this My login.aspx page sometimes loads into all frames of my default.aspx page when I try to load the default.aspx page while not yet logged on. As far as I can tell, what is supposed to happen is that if a user is not yet logged on (Forms based Authentication) and tries to access any page on that web, then he/she should be immidiately redirected to the login.aspx page. But what is happening is that the default.aspx page is being loaded, and then all the frames on it contain seperate instances of the login.aspx page...Any ideasTIA Chris
VIEWS ON THIS POST

130

Posted on:

Wednesday 28th November 2012
View Replies!

remote access database

Hi:I'm programming an aspx in notepad with visualbasic.net code.By Code, How can I access and query an access database that is in another server on the weborwhere can I find information about it
VIEWS ON THIS POST

80

Posted on:

Tuesday 1st January 2013
View Replies!

Accessing a web user control properties

Let's say I have a web user control that just has "textbox1" and "button1" on the control.\tThen I drop it on webform1.aspx.If I type something in the textbox of the user control, how do I get that information on the page_load (or any other event for that matter) of webform1.aspx
VIEWS ON THIS POST

385

Posted on:

Tuesday 1st January 2013
View Replies!

Problem copying solution to another computer

I'm building an asp.net project, works great, but I'd like to be able to work on it from my laptop as well.\tso I copied all the web files, then the solution file, then configured IIS to point to that folder.\tI can open the solution, build the solution, but when I press play, there is an error stating"Unable to start Debugging on the web server, the project is not configured for debugging". Well debugging works fine on the desktop where I created originally, and I'm using the exact same webconfig file, so anyone have an idea of whagt's going on here
VIEWS ON THIS POST

128

Posted on:

Tuesday 1st January 2013
View Replies!

Deleteing a Record and Passing a Record

Tek-Tips, two questions for you...So, i've got an Access database driven online application.Pretty normal pretty simple stuff.\tI've got a delete function working just fine, but I find that when I make a record...let's say the Primary ID key is 7...if I delete that record then create a new record the next record's ID is going to be 8.\tI figure this is bad since evetually, although improbable the database even only with one record in it, could be at ID 10000000000 or whatever.\tShould I be concerned\tAlso.\tI'm trying to create a link, that when clicked on goes to a "details" page for instance. Just like on monster.com when you click on the job it sends you too a bigger page with more details and information on it.\tHow can I pass one record to a page and load only that one recordI hope I made sens
VIEWS ON THIS POST

163

Posted on:

Tuesday 1st January 2013
View Replies!

Session hold data table problem

HiI have datatable on a page which\ti put into a session and then use this datatable on subsequent pages.\tHowever when I call this Session I get an error saying "Specified cast is not valid"I use a procedure as below to to apply my session to the datatableIf IsNothing(Session("ProviderTypes")) Then 'check to see that the session is fully if not then populate session\tobjProvType = New ProviderTypes(ctrl)\tobjProvType.load(ds.ProviderType)\tobjProvTypTB = ds.ProviderType\tSession("ProviderTypes") = ds.ProviderTypeEnd IfobjProvTypTB = Session("ProviderTypes") 'line of errorI cant seem to work out what im doing wrong
VIEWS ON THIS POST

416

Posted on:

Tuesday 1st January 2013
View Replies!

Sending Mail Using .NET

Hi ,\tI have scanning thru on topics of sending mails using .NET. I have tried the below code for sending mails .This issue is that mails cannot be sent.\t\t\t\tDim mail As New MailMessage()\t\t\t\tmail.To = "tovalidmail@mail.com"\t\t\t\tmail.From = "fromvalidmail@mail.com"\t\t\t\tmail.BodyFormat = MailFormat.Text\t\t\t\tmail.Subject = "Subject of this Email"\t\t\t\tmail.Body = "Body of this message."\t\t\t\tSmtpMail.SmtpServer = "localhost"\t\t\t\tSmtpMail.Send(mail)\t\t\t\t\t\t\t\t-----------------------------\t\t\t\tAlso no error is displayed but mail is nor sent\tQuery 1) This code is run on my home PC Win2k server \twould the above code be able to send mails using the \tlocal SMTP server on my machine Or does it require \ta dedicated Exchange Server setup.\t\t
VIEWS ON THIS POST

465

Posted on:

Tuesday 1st January 2013
View Replies!

have visual studio pro where's asp.net?

I have visual studio pro where's asp.net\tThe box says I get c#, c++, and vis basic .net, I want to know where is the asp.net\tHow does one get it and what does it cost if I already have visual studio
VIEWS ON THIS POST

453

Posted on:

Tuesday 1st January 2013
View Replies!

How to keep boolean value after page load.

I am using vs2008, vb.net, and crystal reports 10.5 to develop a ticketing system.\tI have a web page with 3 cr viewers that print the 3 different ticket copies (as activex reports). I set a boolean switch saying the that this has printed (True). But when I go to load the next cr viewer and go to process it, the switch has reset to false and wants to print the same ticket copy again. I have the switch dimmed as "Public CustPrinted As Boolean".\tDown in a separate sub which is triggered with a button click, I have the following code:\tIf CustPrinted = False Then\t\tPrintCustomer()' In here the CustPrinted is set to true\tElse\t\tPrintWarehouse()\tEnd IfPrintWarehouse is never hit because CustPrinted is reset to false after I print the Customer Copy.I would appreciate any help.\tThis is being executed on a Intranet web server, so I can't use the crReport.PrintToPrinter(1, False, 0, 0) command
VIEWS ON THIS POST

145

Posted on:

Tuesday 1st January 2013
View Replies!

dynamic hyperlinks with master page

I want to build a list of links dynamically from the database.\tI can add controls just fine but getting them to be cosmetically pleasing is a bit of a challenge.\tI had hardcoded them previously in table cells. Can I simulate that dynamically\t\tIf so, how\t\t
VIEWS ON THIS POST

154

Posted on:

Tuesday 1st January 2013
View Replies!

Passing objects in ArrayList

Can anyone tell me the best method to pick a record from a database using ExecuteReader, and passing it into an arraylist or any collection. I basically want to store all the records into a collection, arraylist or dictionary and then use that to display data. Currently i have a class, with properties corresponding to the fields, storing them into those properties, and then adding every instance into an ArrayList. Is it possible to access individual properties from the object added to the arraylist, or am i completely in the wrong direction While objReader.Read mcp.SurveyQuestion = objReader.GetString(2) mcp.Option1 = IIf(IsDBNull(objReader.GetValue(3)), " ", objReader.GetString(3)) mcp.Option2 = IIf(IsDBNull(objReader.GetValue(4)), " ", objReader.GetValue(4).ToString) mcp.Option3 = IIf(IsDBNull(objReader.GetValue(5)), " ", objReader.GetValue(5).ToString) mcp.Option4 = IIf(IsDBNull(objReader.GetValue(6)), " ", objReader.GetValue(6).ToString) mcp.Option5 = IIf(IsDBNull(objReader.GetValue(7)), " ", objReader.GetValue(7).ToString) questionairre.Add(mcp) End Whilewhere mcp is the instance of the class and questionairre is the Arraylist where i am adding the instance of the object.Is this a feasible way\t
VIEWS ON THIS POST

167

Posted on:

Wednesday 2nd January 2013
View Replies!

manipulating data in a gridview

I have a gridview that spits out a column like this:status------openclosedpendingopenclosedI want to capture the 'closed' iteration and make the word 'closed' it into a hyperlink that you can click on to take you to another page with more info.i should be able to do this using vb in my codebehind, shoudn't I - but i'm having trouble with the syntax and I don't know what properties/methods to manipulate - help
VIEWS ON THIS POST

172

Posted on:

Wednesday 2nd January 2013
View Replies!

Best use of ASP.NET membership tools and SQL logins/roles

I'm just now learning of the membership tools available in ASP.NET 2.0 ... looks very powerful, and relatively easy to manage. It brought up some questions about how they'd relate to SQL logins and roles.An app that I am expecting to begin working on shortly will have a hosted SQL Server 2005 as its data source, using SQL authentication. (By hosted, I mean a hosting company will provide the hardware and maintain the server, but it will not be shared with other customers) The database will have several SQL roles, with SQL logins assigned to each. Stored procedures, views, etc will all have their permissions tied to user roles. There is the likelihood that users will be interfacing with means other than the ASP.NET pages (VB.NET forms are a possibility ... want to leave this functionality open) so permissions being based on data is fairly important.Questions:- How do folks typically work with such an app ... use ASP.NET membership in conjunction with SQL logins/roles, or just choose which of the two is best for their situation- Better to use Windows authentication (possible in such a scenario)I'm not much on server technology, and just learning the ASP.NET authentication ...
VIEWS ON THIS POST

133

Posted on:

Wednesday 2nd January 2013
View Replies!

Creating ASP.NET/HTML pages 100% programmatically

Is it a possible create HTML pages 100% programmatically\tParticularly in VS2005, this would mean creating an empty .html file, putting it into a member pages folder, "figuring out" and adding HTML to the file, closing it, and associating it with a code behind file.I'm not sure WHY I would do it, but I would like to know if it's possible to do all these step(and, if it's in fact a "standard practice" in some situations)
VIEWS ON THIS POST

419

Posted on:

Wednesday 2nd January 2013
View Replies!

CDOSYS

When using CDOSYS to send mail why do you have to configure\tyour mail object to point to the remote SMTPserverIf my ASP script is running on the same server as SMTP why do I have to configure itcheers
VIEWS ON THIS POST

122

Posted on:

Wednesday 2nd January 2013
View Replies!

How can I find out the current row in datagrid?

Hi ThereI have a datagrid with a textbox control in column 2 which is set to autopostback=true.I have linked the OnTextChanged event to a sub in the vb code but I cannot determine which row the textbox event was triggered from!My sub looks like this :Public Sub tbAddExtension_Text_Changed(ByVal sender As Object, ByVal e As System.EventArgs)\t\t\t\t'get the row number (corresponds to year number)\t\tEnd SubI thought the row index would be sent here as either 'sender' or 'e' but I cannot get the syntax right!Does anyone know how to do this
VIEWS ON THIS POST

394

Posted on:

Wednesday 2nd January 2013
View Replies!

upload csv file into the database

I am using the following code but it doesn't do the job. Can someone tell me where I went wrong.
VIEWS ON THIS POST

85

Posted on:

Wednesday 2nd January 2013
View Replies!

Change vs.net internal browser???

If possible, how do I change the internal browser to something other than Internet Explorer if I want to preview/debug my pages from the IDE I would like to use FireFox or Netscape for instance.
VIEWS ON THIS POST

363

Posted on:

Wednesday 2nd January 2013
View Replies!

News letter Updates

hi Guys, need your help. I am developing a site using asp.net. want to add a page which contains a space for narratives, information, news updates.I am not sure how to do it. I thouhgt of the following:1. use word doc and save as html2. create an aspx page with a panel, then write down all what I need inside the panel3. Other option that I am not familiar with,Your guidance is appreciated.By the way, the information will not change by the user, It will chance once every month, so I guess, I d not need to connect to the database and pull the narratives or what do you think
VIEWS ON THIS POST

396

Posted on:

Wednesday 2nd January 2013
View Replies!

Checking if a dataset is empty

I use a session variable to store the data filled in three form pages registration. On every page I create a dataset with a table object in it and then I assign the dataset to the session. If the user decides going back to the previous form page I want to refill all the form fields with the data stored in the session, now I am trying to do it thus on the second page: (in the case of user comes from the third page)CODESub Page_Load(sender As Object, e As EventArgs)\tIf Not IsPostBack Then\t\tDim ds2 As DataSet\t\tds2 = CType(Session("UserData"), DataSet)\t\t\t\tIf Not isNothing(ds2.tables(0).rows(0)) then\t\t\t\t\t\t\tname.Text() = ds2.Tables(0).rows(0).Item("companyName").ToString\t\t\t\t\t\t\tstate.SelectedValue = ds2.Tables(0).rows(0).Item("State").ToString\t\t\t\t\t\t\t\t\t\tcity.SelectedValue = ds2.Tables(0).rows(0).Item("city").ToString\t\t\t\t\t\t\t\t\t\t...\t\t\t\tEnd If\tEnd IfEnd SubBut I receive this error just when I come normally from the first page to the second: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.Line 73: state.SelectedValue = ds2.Tables(0).rows(0).Item("State").ToStringI don t understand this error because the subroutine says that only set the values from the session to the form fields if the data exists in the dataset: 'If Not isNothing(ds2.tables(0).rows(0)) then'. And if I come from the first page the dataset of the second page it doesn t exists yet...Somebody knows what is the problemOn the first form page:CODESub userData(Sender As Object, e As EventArgs)\t\tDim ds As New DataSet() \tDim dt As New DataTable() \tdt.columns.add("Mail")\tdt.columns.add("Password") \tdt.columns.add("userType") \tdt.columns.add("zipCode") \tdt.columns.add("companyName")\tdt.columns.add("State")\tdt.columns.add("City")\t...Dim row As DataRow\trow = dt.NewRow()\trow.Item("Mail") = mail.Text\trow.Item("Password") = password.Text\trow.Item("userType") = userType.SelectedItem.Value\trow.Item("zipCode") = zip.Text\t\t\tdt.Rows.Add(row)\tds.tables.add(dt)\tSession("UserData") = ds End SubOn the second form page:CODESub userData(Sender As Object, e As EventArgs)\tDim ds2 As DataSet\tds2 = CType(Session("UserData"), DataSet)\t\tDim row As DataRow\trow = ds2.Tables(0).Rows(0)\trow.Item("companyName") = name.Text\trow.Item("State") = state.SelectedItem.Value\trow.Item("City") = city.SelectedItem.Value\t...\tSession("UserData") = ds2\tresponse.Redirect("Form3_NewUser.aspx")End SubThank you
VIEWS ON THIS POST

419

Posted on:

Wednesday 2nd January 2013
View Replies!

Web.Config Help

Below is my web.config file.I have set it up to try and let a user access ANY page in my application except for the one named guestbook.aspxIt is giving me the following configuration error however - "Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."\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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
VIEWS ON THIS POST

156

Posted on:

Wednesday 2nd January 2013
View Replies!

Overcoming large image map problem in IE

Hi all,On one of our web applications, an image is created dynamically.\tOn this image the user can hover the mouse over some parts of the picture to get certain information, and can then click on these same annotations to edit them.\tIn order to do this, I create an image map along with the image.\tThe image map has onMouseOver and onClick properties for the image.The problem is that the image map for this picture can get quite large, and when it gets too large it drives internet explorer nuts.\tIn one example, the image map alone is 1.5 MB of information, and when internet explorer tries to open it the browser will not show the image, the buttons go haywire (i.e.\tradio buttons are replaced by j's), and after closing the browser, windows will act weird\t(such as right-click menus coming up all black) until I restart the computer.\tI have tried to run the app on a few different computers, all with the same symptoms.\tI can run it in Netscape 7.0, but cannot get it to run in IE.\tDoes anyone know why IE does this\t\t Kevin B..Net Programmer\t
VIEWS ON THIS POST

339

Posted on:

Wednesday 2nd January 2013
View Replies!

Server Application times out

By "it runs for 3 minutes" do you mean its doing processing and not showing a page for 3 minutesIf so, you could have some memory leak and are actually bringing down your web server!Could you give more detail of what your page is actually doingD'Arcy , 1 to 3 HOURS!ok...we should look at the architecture of this then, because a web app may not be what you want here. Let me explain:Each session has a timeout value. This is necessary because if it didn't, your webserver would get jammed up with processing and storing variables, and it would cease to function (usually showing a familiar Server Application Unavailable error). The idea though is that if someone is actively interacting with the site, then the session stays live. But if inactivity happens, the session will die.Whats happening in your case is that you're asp.net page is calling some code that is doing some MAJOR processing. The timeout of your IIS is probably kicking in before the processing is complete, effectively killing your app.HOWEVER, I wouldn't suggest bumping up your timout to 3 hours, because that means that if I log into your site, and close my browser, unless you can catch that and abandon my session, my session will stay active for 3 HOURS! Multiply a few hundred users, if not thousands depending on usage and traffic, and your site won't last too long.So here are some options for you:1. Create a Windows Service. This is a program that runs in the background of the server. When you need some processing done, you could have your aspx page pass some vars to the service and get it going, while telling your users to "come back later" to retrieve their data. This will do a few things:a. It will take the processing load off of IISb. You're users won't have to have their browser open for 3 hours just to see the results; they can come back later.2. If its something like report generation, try and automate the process during non-busy hours.i.e. if a financial report is run every thursday morning, instead of the users having to request it, just have a service or some other application automatically crate the report at a pre-determined time (like 2 am for instance), so all the users do in the morning is grab the finished report (which also was processed during a non-busy time, so it probably won't take as long)If you'd like more insight on how to rectify this, let us know a bit more detail about what it is you're trying to do (and why its taking 3 hours max to do it; although I'm guessing its report related)hthD'Arcy
VIEWS ON THIS POST

385

Posted on:

Wednesday 2nd January 2013
View Replies!