I have a form that has two asp:buttons on it. When one button is pushed, I want the page to do some validation that I'me doing with Javascript and submit based on a condition, BUT, if the second button is pushed, I just want it to submit without any validation. What I'm doing now is, in the...
I have a parent form that I have set the focus to a certain textbox. The focus works fine, but the problem is, when I open the popup using window.open(), it resets the focus to the same textbox again hides the popup behind the parent window. Is there any way around this?
Thanks in advance.
I'm sure this question has come across this forum many times. I have a Dell Latitude D600 that I put in a docking station at work (dock, external keyboard, external mouse, external monitor), and I want to increase my productivity with dual monitors. I have a MOBILITY RADEON 9000 video card...
This could be a dumb question but I'll give it a go anyway. I'm using SQL Server 2000, and I'm trying to take a variable and make sure it has no spaces in it, ANYWHERE!!! As easy at this seems it's really confusing me.
Ex. - If a varibalbe looks like this 'Lee Ann', I want to change it to...
I have this line of code that works with my class. I want this to return null if selecteditem.value == 0. Problem being that when null is converted to int it returns 0. I need to put a null value into my database. Any suggestions.
address.StateID =...
I'm having some trouble handling Null values when I submit them to my database from my .net page. I can handle the strings fine, obviously, but I'm having trouble with foreign keys and dates and things like that. I was just wondering if anyone had a good site for me to look at to read up on...
I have a class that calls a date out of my database. If there's no date in the database I want the field to be blank, but if it's blank it puts 01/01/01 in the field. This is how I'm evaluating it.
if(dr["EstCompDate"].ToString() != String.Empty)
t.dtEstCompDate =...
I'm pulling a date out of a database and putting it in a label on my .aspx page. My question is, what is the easiest way to format the date to this format. mm/dd/yyyy. A shortdatetime format. I've found many different ways to do it but I wanted to know what the easiest is. This is how I...
This should be a fairly easy question and I'm not sure why I can't get this to work. I have an asp:button on my page and a javascript function in the html. I need to call this funtion using c# on the btnCancel_Click() event. I'll show you the funtion and the code I'm using but for some reason...
I have a form, and when I click the Submit button I get this error.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where...
This is my statement and it returns 8 of each each answer even though there should only be 2. So there's 16 instead of 2. I know you can use distinct but is there anyother way to fix this. I feel like select distinct will leave some answers out.
select t.AssetID, a.AssetID, t.CustodianID...
I've been working with this problem for a while but have been unable to come up with a solution that works. I have a parent page called CustodianView.aspx and a child page called DeleteCustodianAssignment.aspx. I use an image button to get from the parent page to the child page, then an...
Is there a way to change the data coming out of a database using an sql statement. For instance, I have a column that's bit. Instead of it saying true/false when it comes up on my page i want it to say yes/no. How do I do this with a sql statement?
Got the ddl working but here's my question. I have two pages, we'll say Page1.aspx and Page2.aspx. When you click something on page 1 it opens page 2 and you can make changes on page 2. So when you click ok on page 2 it brings you back to page 1 but i need page one to reload to show the...
I'm trying to create a statement for a dropdown list but it says there incorrect syntax near +. I think this should work. What I want to actually show up in the ddl is Asset Tag - AssetMfr AssetDesc.
string sql = "SELECT a.AssetID, a.AssetMfrID, m.AssetMfrID, a.AssetDescID...
I'm trying to pass a variable from one page to another and I"m getting the input string in correct format error. I usually can work arround this error but this time I can't. Here's the code.
protected void grdAssets_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs...
I'm trying to put the current date into a table with column name StopDate (smalldatetime) and table name psd_AssetCustoian. AssCustID is the Primary Key.
This doesn't work. Any clue why?
SET StopDate = CAST(GETDATE() AS smalldatetime) WHERE AssCustID = @AssCustID
Thanks in advance
Quick formatting question. What is the easiest way to change the format of a boolean variable in a datagrid on an asp webpage. Would it be to do it in the SQL procedure, or is there a way to put it right in the c# code?
I'm just trying to convert a column in a datagrid to dd-mm-yyyy instead of day/month/year and then time.
This is my statement:
try
{
DateTime StartTime = Convert.ToDateTime(drv.Row.ItemArray[1]);
e.Item.Cells[1].Text = StartTime.ToShortDateString();
}
catch
{
e.Item.Cells[1].Text = "";
}...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.