|
95ulisse wrote: I solved the problem creating a third page and requesting it via AJAX
Of course, every problem can be solved by another level of indirection
Just because you can doesn't mean you should. Design the solution correctly and it will limit your problems in the future.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You are right, but in this way my page doesn't need to refresh
and I think it's better for the user!
|
|
|
|
|
You don't need a third page to make use of AJAX. You are adding complexity where it is not necessary which will make your application more difficult to maintain and enhance.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
I have a checkboxlist which is databound in code behind.
chkListBaseMaps.DataSource = oDataSet
chkListBaseMaps.DataTextField = "LayerName"
chkListBaseMaps.DataValueField = "Layer_ID"
chkListBaseMaps.DataBind()
I get the checkboxlist ordered on Layer_ID.
I delete/insert items in checkboxlist and do the same with associated dataset and bind the chklistbox again.
What I need is everytime I bind the checkboxlist, i need the checkboxlist to be ordered (sorted as ASC) on LayerName field which is datatextfield. How to do that?
thanks
vijay
|
|
|
|
|
Why not use DataView to associate with checkboxlist and bind it?
Do all you need with dataview... sorting... filtering!
Thus, this line would change: chkListBaseMaps.DataSource = oDataSet oDataView
|
|
|
|
|
Yep helped it
Thanks a lot
vijay
|
|
|
|
|
So i worked about a year with asp.net with vs 2003 and .net2.
Looking to restart where i left with the brand new vs 2010 with asp.net webforms (mvc looks too different and i am a bit tight on time to relearn the whole thing).
However my deployment server is a Windows Server 2003, can i work with VS 2010 asp.net webform project or would it be better for me to downgrade to a previous version of Visual Studio?
Thanks in advance
|
|
|
|
|
Or maybe this is a better way of phrasing this,
Is there a way to target IIS 6 with Visual Studio 2010?
|
|
|
|
|
Hi,This is first time that i am trying to connect to an OPC server(KEP and MATRICON). I dont have any idea about it, so please can anybody guide me through how to connect to an OPC server(KEP and MATRICON) & fetch values from it. I am using ASP.net with C#.
Thanks in advance.
modified on Tuesday, June 1, 2010 8:03 AM
|
|
|
|
|
Dear friends,
I want to fetch data from Excel sheet sheet1 using ASP.NET with C# and store the data in SqlServer database table using BulkCopy method. I am able to fetch complete excelsheet data, but I want only some rows. I want sql statement to fetch the data. Excel sheet contains one Date column. I want to fetch data from only particular dated rows. I am writing the following query
select * from [Sheet1$] where Date=21/04/10 It is giving me error datatype mismatch. Please, can anyone help me. It's very urgent. Pls....
Thanks,
Dileep.
|
|
|
|
|
Try the following query:
select * from [Sheet1$] where Date='04/21/2010'
Note that the date should be in mm/dd/yyyy format and within single quote(').
|
|
|
|
|
Dear Anurag,
I am still getting this following error.
[System.Data.OleDb.OleDbException] = {"Data type mismatch in criteria expression."}
I have written the following code.
filename = path + "SS_EmpLoginTimings.xls";
string s = "provider=Microsoft.Jet.OLEDB.4.0;" + @"data source=" + filename + ";Extended Properties=Excel 8.0;";
OleDbConnection con = new OleDbConnection(s);
con.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select * from [Sheet1$] where Date='04/21/2010'", con);
DataSet ds = new DataSet();
da.Fill(ds);
DataTable dt = ds.Tables[0];
BulkCopyData(dt, "SS_EmpLoginTimings");
public bool BulkCopyData(DataTable dt, string tblName)
{
SqlBulkCopy bulk = new SqlBulkCopy(conn);
bulk.DestinationTableName = tblName;
conn.Open();
bulk.WriteToServer(dt);
conn.Close();
return true;
}
Please help me. It's very urgent. I need to finish this work by today evening. Pls pls pls...
Regards,
Dileep.
|
|
|
|
|
Have you got da and ds the wrong way round in the da.fill(ds)?
It's while since I coded anything like this so I could be totally wrong.
Maybe try putting the criteria as Date = '21-Apr-2010'.
|
|
|
|
|
|
How consistant is the data in your spreadsheet? Do all of the rows have dates in the date column? The Excel database driver determines the datatype of each column by the values in the first 10 rows. If your first ten rows have nothing in the date column or have other text like N/A or -, then that column will not be considered a date and you can't query it like a date.
|
|
|
|
|
Dear friend,
All the rows in that column are having date only. I don't know what's wrong. I have tried in many ways. I am getting the following error.
[System.Data.OleDb.OleDbException] = {"Data type mismatch in criteria expression."}
Since last day afternoon, I am struggling for this. I have written queries in all following possible ways.
select * from [sheet1$] where LoginDate='21/04/10'
select * from [sheet1$] where LoginDate='21/04/2010'
select * from [sheet1$] where LoginDate='21-04-10'
select * from [sheet1$] where LoginDate='21-04-2010'
select * from [sheet1$] where LoginDate='21-Apr-10'
select * from [sheet1$] where LoginDate='21-Apr-2010'
select * from [sheet1$] where LoginDate='04/21/10'
select * from [sheet1$] where LoginDate='04/21/2010'
select * from [sheet1$] where LoginDate='04-21-10'
select * from [sheet1$] where LoginDate='04-21-2010'
select * from [sheet1$] where LoginDate='Apr-21-10'
select * from [sheet1$] where LoginDate='Apr-21-2010'
select * from [Sheet1$] where [LoginDate] = '"+DateTime.Parse("04-21-10").ToString()+"'"
select * from [Sheet1$] where [LoginDate] = '"+DateTime.Parse("04-21-10")+"'"
Still I am not getting. Can anyone, pls help me. It's very urgent.
Regards,
Dileep
|
|
|
|
|
Thanks friends,
I have got it in another way.
select * from [sheet1$] where LoginDate=#21/04/10#
It's working fine.
Thanks everyone.
Regards,
Dileep.
|
|
|
|
|
how to type the same number in a single column?
|
|
|
|
|
Can you be a little more elaborate? We cannot read your mind to guess of what you can be talking!
|
|
|
|
|
1. Enter required number in a grid cell in Access.
2. Use cursor keys to move down to new row, committing the previous row
3. Go to 1.
|
|
|
|
|
In my aspx page, I have an input box which should be the format as follows:
1. First 3 or 4 characters should be alphabets (maximum 4).
2. After this, there is a constant text, '2CDSV=DT' (8 characters).
3. The text should not be more than 12 characters.
For eg: the text should be either 'RIN2CDSV=DT' or 'RINJ2CDSV=DT'. Both are valid.
How can I frame a regular expression for this? Anybody has any idea?
I put only this: ("[^0-9]"), but this will check only the alphabets. How can I join the 2nd and 3rd condition.
Please help.
Thanks in advance,
meeram395.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
I guess this one works...
^([a-zA-Z]{3,4})(2CDSV=DT)$
|
|
|
|
|
Thanks a lot. Let me check and get back to you.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
It is partially working, means it is validating properly. But it seems that it is case sensitive.
If I try with RIN2CDss=dt, it is gving error. Any idea how should I make it case-insensitive?
Thanks for your efforts. Please reply if you can help on above.
Thanks
meeram395.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
meeram395 wrote: If I try with RIN2CDss=dt, it is gving error.
It should. That's how you have written the regex.
See again: ^([a-zA-Z]{3,4})(2CDSV=DT)$
So RIN2CDsv=dt should work.
..Go Green..
|
|
|
|