SEARCH YOUR SOLUTION HERE  

Binding to DropDownList problems

i'm having problems binding to the DropDownList control. Here's my code:

CODE

and here's my code behind (Page_Load event handler):

CODEDim lstCategoryID As DropDownList = CType(FormView1.FindControl("lstCategoryID"), DropDownList)

lstCategoryID.DataSource = Utilities.GetCategoriesList()
lstCategoryID.DataBind()
When i run the application i get the error:

'lstCategoryID' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

This seems a strange error since there is a value in the DropDownList which is the same as the value i am trying to bind to. I think it might be something to do with me loading in the contents of the DropDownList with the Page_Load event handler (since i have had no problems with dropdownlists with static options). I have also tried putting in the Page_Init event handler but this did not work either.

Appreciate if someone could help.

Posted On: Wednesday 2nd of January 2013 12:50:52 AM Total Views:  136
View Complete with Replies




Related Messages:

Problem with mootools slider   (324 Views)
Are you getting any errors or are you including any other javascript libraries in the Master Page that might be causing a conflict This post has been edited by Nakor: 16 June 2011 - 09:32 PM
DATE   (145 Views)
How to use the Datevalue entered in textbox to find datediff using function with date as value entered in another text box in asp.net with vb.net i.e TextBox1.Text = Date.Today in page_load. & Dim dt1 As Date = Val(TextBox1.Text) Dim dt2 As Date = Val(TextBox2.Text) Response.Write(DateDiff(DateInterval.Day, dt1, dt2)) in button_click
reading value in array into a textbox   (259 Views)
im having problems reading a value that is returned in array into a textbox.ironically i did not declare the variable as an array, but it somehow returns its results in a System.Array.below is a snippet of the code Dim LdapAttributes = "Description" '''here goes code to get LdapAttributes value 'the below attempts to read the value of LdapAttributes Dim LAttribute As String Dim Attribs As Array Attribs = (LdapAttributes.ToString()).Split(",") For Each LAttribute In Attribs Me.TextBox13.Text = LAttribute & "=" & AdoDBRecordSet(LAttribute.Split(";")(0)).Value Nextthe value returned in an array is that of LdapAttributes.the results are as follows "IT department; Developer"I want to send the text 'Developer' to the textbox. help!
Force numeric characters in Visual Developer 2005   (198 Views)
,I created a web form that has the ability to edit and post the inserted text to external page. The problem I'm having is when a user inserts text in a text box field that was designed for dates, the form gives an error that it will not accept a NULL and terminates; see below. This is in the program Visual Developer 2005. I would like to know if there is a way to force the user to use only dates in a date field or numbers In VB it would be done with "IsNumeric(txtNumber.Text)". I would also need the same for the NULL, I would need to find a way so that it would not error out
Welcome UserName   (273 Views)
i want to develope page with follwing requirement.1) When a registered user fill login name and password and submit aspx page , if validation succed i want to show "Welcome " user name on page. 2) how to create new session for that member 3) how to check wheather that user's session is active pls help me with snips.thanx in advance.
OO Dynamic navigation controls in ASP.NET   (143 Views)
Hi everybody,I'm creating twee sites (one in flash and one in ASP.NET). I have created a dynamic navigation (looks like the navigation panel of outlook or the navigation on the left handside in Visio when choosing components for UML or so). So, it has moving buttons. The buttons are drawn depending on a variable XML file coming from the database. For flash it is finished and fully object oriented and works just fine. It can be reused, the colors can be changed, the size can be adapted at compile time.Now, my question is, I want to create this in ASP.NET but I don't know which language to use to implement this in ASP. I can do it using javascript of course or DHTML, but I want it fully object oriented so I can use it the next time and I can make adjustements to the look at compile time. When I do it directly in C#, I get a refresh of course and that is not an optionCan anybody please please please help meGreetings,Glenn
Background in CSS   (175 Views)
pdan2993 Fayetteville, GA Since 8/19/2003 Posts 371 Reputation 2,800 Reply Patrick Daniel (pdan2993) replied on 9/1/2004 8:25 AM rated by 0 users in what folder is the css file stored Looks like your just haven't gotten your relative path correct.
how to insert scroll bars vertical and horizontal in a datagrid   (198 Views)
hi i want to know how to insert scroll bars vertical and horizontal in a datagrid it is becoming tooo large for the pagethanx
Network Read/Write Permissions issue??? Urgent   (171 Views)
Environment - VB.NET, ASP.NET, SQL Server 2000. In our web application, we are using multiple Web Servers for load balancing. The application needs to write to a Text file but not on Web Servers, as it will be hard to manage. So, we want to write to Text file on a netwrok share folder on seperate machine.Now, the problem is, Application can't write on that SHARE as ASPNET user doesn't have proper permission for that. How do we resolve this issue How I provide permissions to ASPNET user, of web application, of all Web Servers so that application can write to that share.Please advice.
Quick Question   (228 Views)
I know html and css and want to move on in web developmet. I am unsure where I should go next, I am also familiar enough with programming that I can use Javascript along the side of a reference guide. I am a bit confused to go from here. I'd like to bring more interactivity between my sites and the clients and plain javascript doesnt seem enough to do the job. I keep reading about server side programming and things such as ASP.Net, PHP, and MYSql. I am aware that ASP.net can be used hand in hand with C#, a language which I am familiar with. Where do I go from here Thank you for your time!
Try Catch with a Nonquery   (177 Views)
Does a finally statement always execute in a try catch or does it only execute if an exception is caught I just want to know which is the correct way to execute a nonquery to catch a duplicate entry Access DB error. Try myCommand.ExecuteNonQuery() Catch ex As Exception rowsAffected = 0 End Try myConnection.Close() Or Try myCommand.ExecuteNonQuery() Catch ex As Exception rowsAffected = 0 Finally myConnection.Close() End Try This post has been edited by eTech1: 10 September 2010 - 08:56 AM
email   (217 Views)
private void btnSend_Click(object sender, System.EventArgs e) { MailMessage msg = new MailMessage(); msg.To = txtTo.Text; msg.From = txtFrom.Text; msg.Subject = txtSubject.Text; msg.Body = txtContent.Value; lblStatus.Text = "Sending..."; SmtpMail.Send(msg); lblStatus.Text = "Sent email (" + txtSubject.Text + ") to " +txtTo.Text; } Admin Edit: Please use code tags when posting your code. Code tags are used like so =>
Help on graphic button submit   (217 Views)
I have a graphic button that I want to use on my web form. Complete the following fields, then choose Next to continue: I need to kknow if there is a tag for this input that will work.What is the syntax that would make this button work.I have problems with the onserverclick.
highlighting a text box in asp.net   (177 Views)
i have seen text box getting highlighted in gmail and some websites, when the focus is on the particular textbox. I want to know how it is done. By the way am using c# lang.
ASP.NET C# input string was not in a correct format (query string)   (164 Views)
folks, I'm in a bit of a bind. I have a page that is to do a function on page load that requires an ID number (integer) passed by a querystring - but I get the error that says "Input string was not in a correct format". My code to get the the value of the querystring and do the function is simple and straight forward. int custID = Convert.ToInt32(Request.QueryString["CustomID"]); RemoveItem(custID); I've tried the following ways as well. //1) int custID = int.Parse(Request.QueryString["CustomID"]); //2) string custID = Request.QueryString["CustomID"]; int intCustID = Convert.ToInt32(custID); RemoveItem(intCustID); //3 int custID = 0; int.TryParse(Request.QueryString["CustomID"], out custID); RemoveItem(custID); //this one only returned the value of 0. I'm kind of at a loss. How do I convert the "CustomID" from the querystring into an integer This post has been edited by mb2000inc: 11 July 2012 - 12:59 PM , Hi... sorry it took me so long to get back to you.... been busy. So, yes....it does give me a value. Actually, I am using a Telerik RadGrid instead of a regular Gridview - I probably should have mentioned that before - not that it has any affect on the query string... it still spits out a value for the sring. I'm currently using the "GridButtonColumn". I guess I can try to use the HyperlinkColumn, but again, I'm not sure it would change the outcome of the querystring. So, how would one convert the string value to an int (not repeating my previous tries. )
File upload control validation   (184 Views)
How large are the videos There are limits on how big files can be...and if the file is too large things tend to crash. You can use the web.config file to try and make this limit larger by setting the to something larger...there is a 2Gb maximum though. -Frinny
PORT   (168 Views)
When im trying to make a web service I usually use the IIS Web Server as my "Servers" using VS 2003 but when I try to make a web service in 2005 they dont accept IIS Web Server option, it shows an error. Attached image(s)
How to display or not display a table row based on an ObjectDataSource   (141 Views)
I'm using an ObjectDataSource to populate a DropDownList. What I want to do is only display the table row that contains this DropDownList if the ObjectDataSource returns results. If it doesn't return any records to populate the DropDownList, I don't want to display the table row.So I have wrapped the table row in a div tag, then figured I could use the Visible property to toggle its display.Here's what I have so far:CODE Supplier: ...Then in the codebehind I figure I need an if statement...CODEif () { this.supplierDD.Visible = true; } else { this.supplierDD.Visible = false; }I'm just not sure how to reference the ObjectDataSource, or if that's even what I need to reference to make this work
Why would you do that?   (206 Views)
It is usually easy to find things that show you "how" to do something, but there is much less that indicates "why" you would want to do something. I am wondering if someone in their wanderings has come across a site, a book, a blog, a podcast, whatever the format, that discusses different language features with an eye towards why you would use them. Something to help beginners transition and understand things, as opposed to copying and pasting code.Just as an example: Custom Controls. I think I get the idea, but I don't know for sure. Just curious
help me GridView c# ASp.net 2.0   (124 Views)
please I want Delete and update from gridview using code but not work and then run msg error : Insert/Update Error:INSERT statement conflicted with COLUMN CHECK constraint 'CK__Customer___Custo__03317E3D'. The conflict occurred in database 'MerryMeeting', table 'Customer_Details', column 'Customer_id'.The statement has been terminated. this is my code : 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.Data.SqlClient;public partial class _Default : System.Web.UI.Page { SqlConnection myconection; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindGridView(); } } private void BindGridView() { DataTable dt = new DataTable(); SqlConnection myconection = new SqlConnection("Persist security info=false;User=sa;Password=123;Initial Catalog=MerryMeeting;Data Source=FBI-4D11DAAB9E2"); try { myconection.Open(); string sqlStatement = "SELECT * FROM Customer_Details"; SqlCommand cmd = new SqlCommand(sqlStatement, myconection); SqlDataAdapter sqlDa = new SqlDataAdapter(cmd); sqlDa.Fill(dt); if (dt.Rows.Count > 0) { MyGridView.DataSource = dt; MyGridView.DataBind(); } } catch (System.Data.SqlClient.SqlException ex) { string msg = "Fetch Error:"; msg += ex.Message; throw new Exception(msg); } finally { myconection.Close(); } } private void UpdateOrAddNewRecord(string id, string Name, string Address, string Number, string Email, string Contact_Person, bool isUpdate) { SqlConnection connection = new SqlConnection("Persist security info=false;User=sa;Password=123;Initial Catalog=MerryMeeting;Data Source=FBI-4D11DAAB9E2"); string sqlStatement = string.Empty; if (!isUpdate) { sqlStatement = "INSERT INTO Customer_Details"+ "(Customer_id,Customer_Name,Customer_Address,Customer_Number,Customer_Email,Customer_Contact_Person)" + "VALUES (@Customer_id,@Customer_Name,@Customer_Address,@Customer_Number,@Customer_Email,@Customer_Contact_Person)"; } else { sqlStatement = "UPDATE Customer_Details" + "SET Customer_Name = @Customer_Name,Customer_Address = @Customer_Address," + "Customer_Number = @Customer_Number,Customer_Email = @Customer_Email,Customer_Contact_Person = @Customer_Contact_Person" + "WHERE Customer_id = @Customer_id,"; } try { connection.Open(); SqlCommand cmd = new SqlCommand(sqlStatement, connection); cmd.Parameters.AddWithValue("@Customer_id", id); cmd.Parameters.AddWithValue("@Customer_Name", Name); cmd.Parameters.AddWithValue("@Customer_Address", Address); cmd.Parameters.AddWithValue("@Customer_Number", Number); cmd.Parameters.AddWithValue("@Customer_Email", Email); cmd.Parameters.AddWithValue("@Customer_Contact_Person",Contact_Person); cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); } catch (System.Data.SqlClient.SqlException ex) { string msg = "Insert/Update Error:"; msg += ex.Message; throw new Exception(msg); } finally { connection.Close(); } } protected void Button1_Click(object sender, EventArgs e) { UpdateOrAddNewRecord(TextBox1.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text, TextBox6.Text, false); BindGridView(); } protected void MyGridView_RowEditing(object sender, GridViewEditEventArgs e) { MyGridView.EditIndex = e.NewEditIndex; BindGridView(); } protected void MyGridView_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { MyGridView.EditIndex = -1; BindGridView(); } protected void MyGridView_RowUpdating(object sender, GridViewUpdateEventArgs e) { string id = MyGridView.Rows[e.RowIndex].Cells[0].Text; string Name = ((TextBox)MyGridView.Rows[e.RowIndex].Cells[1].Controls[0]).Text; string Address = ((TextBox)MyGridView.Rows[e.RowIndex].Cells[2].Controls[0]).Text; string Number = ((TextBox)MyGridView.Rows[e.RowIndex].Cells[3].Controls[0]).Text; string Email = ((TextBox)MyGridView.Rows[e.RowIndex].Cells[4].Controls[0]).Text; string Contact_Person = ((TextBox)MyGridView.Rows[e.RowIndex].Cells[5].Controls[0]).Text; UpdateOrAddNewRecord(id, Name, Address, Number, Email, Contact_Person, true); MyGridView.EditIndex = -1; BindGridView(); } private void DeleteRecord(string ID) { SqlConnection connection = new SqlConnection("Persist security info=false;User=sa;Password=123;Initial Catalog=MerryMeeting;Data Source=FBI-4D11DAAB9E2"); string sqlStatement = "DELETE FROM Customer_Details WHERE Customer_id = @Customer_id"; try { connection.Open(); SqlCommand cmd = new SqlCommand(sqlStatement, myconection); cmd.Parameters.AddWithValue("@Customer_id", ID); cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); } catch (System.Data.SqlClient.SqlException ex) { string msg = "Deletion Error:"; msg += ex.Message; throw new Exception(msg); } finally { connection.Close(); } } protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { string id = MyGridView.Rows[e.RowIndex].Cells[0].Text; DeleteRecord(id); }}help me !!
Force login page   (317 Views)
Hie all I have developed a website and i want to access the pages from frmMain where users login, I have set the page frmMain as the start page but i can still type the page name like:http://localhost:2942/Website/frmAddUsers.aspx and access it, Does anyone know how to stop this. , You can also add a check on this page:http://localhost:2942/Website/frmAddUsers.aspxthat will test for the 'sending' page and if it is not your login page, take some action ( like sending the user to the proper starting page) To Paraphrase:"The Help you get is proportional to the Help you give.."
authentication mode   (205 Views)
Do I need this in my web.config file I am not doing any authentication.here is my web.config file and could you correct me if you see unnecessary file there.
BC30506: Handles clause requires a WithEvents variable.   (245 Views)
I hope someone can assist me here. I've been searching online about the error I am getting but the solutions I am finding all refer to a code behind page which I do not have.The error I am getting is:CODEBC30506: Handles clause requires a WithEvents variable.Line 15: Public Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\fpdb\guestbook.mdb") & ";"Line 16: Line 17: Private Sub btnInsert_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnInsert.ClickLine 18: Dim cmd As New OleDbCommand("INSERT INTO [guestlog] ([Firstname], [Lastname], [Email],[Lot],[IP]) VALUES ('" &txtFirstName.Text & "','" & txtLastName.Text & "','" & txtEmail.Text & "','" & txtLot.Text & ClientIP &"')", New OleDbConnection(strConn))Line 19: cmd.Connection.Open()My page simply grabs data from a form and is supposed to add it to an Access database. Here is the code I have, I hope someone can suggest a fix.
Call aspx FROM VB.NET class   (223 Views)
Does anyone know if it's possible to call an ASPX form from a VB.NET clas
Why dropdownlist re-bind every time?   (165 Views)
I bind a dropdownlist using dataset. After page loaded, it displays all items, but once I select a item, it take a long time to re-bind. What is wrong How to code SelectedIndexChanged
DataGrid Overwritting   (230 Views)
I am doing some testing of an application and ran into a problem. I have a datagrid that that uses a dataview as its source. The dataview is a filtered view of a cached dataset (ie, the user can search the cached dataset). If I open multiple windows on my pc and do two differents searches, each page gets the correct data. When I change pages on the datagrid at the same time on the seperate windows, the datagrids mess up. Sometimes I get errors and sometimes one window pulls the data that is in the other window.Has anyone seen this before Is this just because I am on one computer with more than one window open or will this happen even when multiple users on different PC's are hitting the site
Sending an e-mail message from a form   (359 Views)
Hi!I am trying to send an e-mail to the user after he/she has entered his/her e-mail address in a form field and has pressed the submit button, but it doesn t work, a long exception is returned. Somebody knows what is the problemThis is the code:CODESub obtain_Password(Sender As Object, E As ImageClickEventArgs) Dim E_mail As New MailMessage() E_mail.To = mail.Text() E_mail.From = "theMarket@theMarket.com" E_mail.Subject = "We send your password" E_mail.Body = "Your password is: " & password.Text() E_mail.Priority = MailPriority.High try SmtpMail.SmtpServer = "newS" SmtpMail.Send(E_mail) Message_ok.Text() = "We have sent your password successfully. catch exc as Exception Message_error.Text() = "Send failure: " + exc.ToString() End TryEnd Sub And this is the exception returned:Send failure: System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x8004020F): The server rejected one or more recipient addresses. The server response was: 550 5.7.1 Unable to relay for mike@yahoo.com --- End of inner exception stack trace --- at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters) at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) --- End of inner exception stack trace --- at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj, String methodName, Object[] args) at System.Web.Mail.CdoSysHelper.Send(MailMessage message) at System.Web.Mail.SmtpMail.Send(MailMessage message) at ASP. forgotten_password.aspx. obtain_Password (Object Sender, ImageClickEventArgs E) in C:\Inetpub\wwwroot\market\forgotten_password.aspx:line 4
Binding data in the Dropdownlist!   (268 Views)
I want to add a dropdownlist box in the form. In that I want to add records that are coming from the database.Rightnow I have a dropdown box shows up in the screen, but I want to add some data that are coming from the database.I don't know, How to do it in ASP.Net
SelectedItem backcolor   (246 Views)
all,I'm trying to get the selected item (only the selected item) to have a backcolor of cyan. However, the problem is that I can't use the commandname="Select" method because I've already assigned the commandname property to another command. Here's the code: Link AND THE CODE BEHIND IS: Sub dg_ItemCommand(ByVal sender As Object, ByVal e As DataGridCommandEventArgs) Dim mo, trn As Double Dim acct As String mo = CDbl(Request.QueryString("postDat")) trn = CDbl(Session("LastPost")) acct = Request.QueryString("acct") If e.CommandName = "doProds" Then sProduct = CType(e.Item.FindControl("lb1"), LinkButton).Text Dim intID As String = dgMMCTRN3.DataKeys(e.Item.ItemIndex) Dim strSQLDet As String strSQLDet = "select MCNRRN, MCCSUM, MCCTYP, MCCTRN, MCAJE, MCFDPT, MCFDBT, MCFCRD, CONCAT(CHAR(MCCSUM),CONCAT(MCCTYP,MCCTRN)) AS ID " & _ "from P12582.MMCTRN3 " & _ "where MCFDBT = '" & acct & "' AND MCDGLM = " & mo & " AND MCDTRN = " & trn & " AND CONCAT(CHAR(MCCSUM),CONCAT(MCCTYP,MCCTRN)) ='" & dgMMCTRN3.DataKeys(e.Item.ItemIndex) & "' AND MCFPAG = '1' " & _ "or MCFCRD = '" & acct & "' AND MCDGLM = " & mo & " AND MCDTRN = " & trn & " AND CONCAT(CHAR(MCCSUM),CONCAT(MCCTYP,MCCTRN)) ='" & dgMMCTRN3.DataKeys(e.Item.ItemIndex) & "' AND MCFPAG = '1' " Dim dr As OleDbDataReader dr = GetDataReader(strSQLDet) e.Item.BackColor = Color.Red dgDetails.DataSource = dr dgDetails.DataBind() dr.Close() End If End SubThe item changes to red, but then when another item is selected, the first item retains the backcolor of red
Adding default sorting arrows to GridView   (289 Views)
I'm new to Asp.net and I'm currently working with GridViews. I've looked around this site and others and have seen tips for how to add sorting arrows to column headers.So far I've got arrows to show on a sorted column by doing this:Set these GridView properties:SortedAscendingHeaderStyle-CssClass="sortasc"SortedDescendingHeaderStyle-CssClass="sortdesc"And my css has this:th.sortasc a { display:block; padding:0 4px 0 15px; background:url("images/icons/ascArrow.png") no-repeat;}th.sortdesc a { display:block; padding:0 4px 0 15px; background:url("images/icons/descArrow.png") no-repeat;}This works great to show an image after the user clicks a header and the column sorts.The issue I'm having now, is that I'd like all columns to show images by default before they're sorted so that users can know that they can click them to sort. Is there a way to accomplish this
C# GridView iterate over non displayed rows   (209 Views)
I have a standard grid view with 100 items in it.I have the page size set to 25.I need to inspect all items to get a full total of all items in the grid, not just the items on page 1.I already have a foreach that iterates over the row collection, but this only iterates over the first 25.TIA,Lodlaiden I haz all the letters: SME, BA, QA, PM, DEV, DBA, UAT, SE, HD
Data Paging BLL Return Value Help   (269 Views)
In Scott Guthrie's article titled Efficient Data Paging with the ASP.NET 2.0 DataList Control and ObjectDataSource he returns his total rows in the same SPROC as his rows of data. He suggests this as a performance optimization and so Im trying to utilize it. But In his example his ObjectDataSource directly accesses the DAL. Ive implemented it this way and it works great. But when I try to have my ObjectDataSource use a BLL Ive setup for my DAL my totalRows are getting returned as 0. How do I properly setup my BLL to return my totalRows This is my BLL code:Public Function Test_Select(ByVal TestID As Integer, ByVal startRowIndex As Integer, ByVal maximumRows As Integer, ByVal totalRows As Integer) As Test_DAL.Test_DataTable Return Adapter.Test_Select(TestID, startRowIndex, maximumRows, totalRows)End FunctionAnd here is my ASPX code:
JS and Textboxes   (221 Views)
I have an ASP.Net page that has two text box controls on it. One if to collect an email address, and the other to collect a home airport code.When the page loads, in the text boxes, I want to have appear "Enter e-mail address" and "Enter Airport Code", respectively. I've set the Text property of the text boxes to show this, of course. However some javascript I'm using is creating behaviors that isn't quite right.In the textbox's onfocus event, I have "this.value=''" which works properly, but I do not want it to fire off on page load because it is clearing out the first of the two text boxes I have. The only other control I have on this page is a submit button, and in my code I placed btnSignup.Focus(), but that button is not receiving focus on Page Load. So this method isn't quite right.The behavior I am after is, after page load and the text boxes display their initial values, if the user types something other than the default value in either of the text boxes, I dont want the text to be cleared if the textbox gains focus again; otherwise, if a text box gains focus and the text in the box equals the initial values, I want them cleared.Any help and direction to some web sources would be great. I've searched Google but I don't think I'm searching the proper term because I'm not finding anything useful. As always,
DatGrid record count   (273 Views)
Hi Group,How can I detect whether a datgrid control has any records I need to check for no records being present.TIA
Error using OWC   (277 Views)
I am trying to use OWC to create charts. I got the following error when I was declaring OWC11.ChartSpaceClassanyone has experience the same problem beforeI reinstall the OWC. still does not fix the proble
Infragistics control javascript client side   (600 Views)
I am using third party controls in my asp.net page. They are infragistics controls and i need to validate the choosen date on a webdatechooser on client side and dont know how to get the chosen date ont eh clietn side without postback.any suggestiosn
Not allowed to use ActiveX controls   (217 Views)
.We are required to disable ActiveX controls and plugins - and therefore we cannot use ActiveX controls on our webpages. However, we were using a treeview control supplied by Microsoft (available after installing IEWebControls). Does anyone know how we can imitate a treeview control's functionality (expandable nodes, scrollbars, etc.) on a webpage without using an ActiveX control Any information or insight will be helpful.
variable life time in a class   (221 Views)
hi, I wonder how Can I go out of scope of a class objectexampleBook myBook = new Book();myBook.Title = "American History";......(is there a code that take the instance of the book out of memeory, )I read that to test the value of reference type, I used if (myBook == null) that means that I am checking if my object has a reference or not. I am not sure if this is correct, please advice.Ehx
how to use downloaded html template to make web page?   (616 Views)
I downloaded some beautiful html template from internet. How to use them to make web page in ASP.NET
If on Logout Page Redirect ONLY to Login Page   (532 Views)
If a user chooses to Logout and gets Redirected to the Logout.aspx Page, If at that point he hits the Back Button or for that matter the forward button, how can I make the session Redirect only to the Login.aspx Page
Dreamweaver and ASP.NET   (87 Views)
Do I need to learn Dreamweaver working with ASP.NET
How do I remove carriage returns from MEMO or NTEXT field? ASP.NET   (275 Views)
I have a memo field as one of the fields that I read from a table and create an array for display later with an alert in javascript.Problem is it has Carriage Returns and the array messes up! I need to remove the carriage returns ... brfore assigning the field.dim strFixIt as StringstrFixIt=IIf(IsDBNull(myDataReader("CompanyInfo")), "", myDataReader("CompanyInfo"))strFixIt.Replace(vbCrLf, Space(1))..but it did not work ..............I also tried strFixIt.Replace(Chr(13),Space(1)) .... but that did not work either.....what can I do When I look in debug mode I see these little squares which presumable represent the carriage returns
ASP.NET and Crystal Reporting   (195 Views)
There are sample app;ications and white papers available at http://www.crystaldecisions.com/products/dev_zone/net/default.asp
Almost there...adding new literal control to datagrid   (61 Views)
I am implementing adding a popup calendar to a datagrid and I have everything working as it should however I would like the image that fires off the popup to appear in a different location withing my datagrid.Int32 iLastCellIndex = e.Item.Cells.Count-1;String sLink2 = ""; //The HTML to add to the Edit celle.Item.Cells[iLastCellIndex].Controls.Add(new LiteralControl(sLink2)); //Add the HTMLthis obviously adds it to the end of the already created controls...is there a way to insert the control in the middle of those controls so that the image for the calendar popup appears next to the textbox to which the value for the date will be returned.
Need Help with ASP.NET Label Control   (146 Views)
I have a simple label control that I need to display in a ASP.NET application and I need to get the label to display in a red colored font. I have tried the following code several times and the text of the label will not change to red, it still displays as black text: (The code is within a table tag.)Total Man Hours: Some one else programmed the application that I'm working with in ASP.NET. I just just changed the .aspx web page on in notepad and then just did a copy and replace but the code did not work. Do I need to reboot either just IIS or reboot the server that this application is located on to get the change in code (I added the ForeColor attribute.) to work and turn the text Total Man Hours to redAny assistance would be greatly appreciated.
Response.Redirect() to open new browser window....   (236 Views)
I'm hoping this is a simple problem...I tend to make use of Response.Redirect to navigate between pages within my web application.In a few instances I want to be able to navigate to a different page - but in the scope of a new browser window.How can I do thisI want this to happen when the user clicks a standard asp button control.I'm using ASP.NET with C# code
Need to know the entire Sowftware developement cycle   (123 Views)
Hi Everyone.I am excited to know the entire software development lifecycleof .net .I mean how it goes in a proper company.Are there any websites which provide this info in detail.Please reply if any one knows
Enumerator (newbie question)   (190 Views)
I'm trying to understand what an Enumerator is..Is it similar to defining user-defined data typesThis is what msdn says:"Enumerators can be used to read the data in the collection, but they cannot be used to modify the underlying collection.
ASP Discussion Forum Software with AD authentication   (203 Views)
I'm hoping to establish a simple forum/bb on our intranet and I was hoping to have users automatically authenticated. Can anyone point me in the direction of discussion forum/bulletin board software that is built to use AD-integrated authenticatio
Write ID3 Properties to an MP3 file on the server   (177 Views)
Does anyone know a way to alter the ID3 attributes of a mp3 via .NET These properties are read/write so I'm thinking there should be some way of accomplishing this...