|
I am using the ObjectDataSource as my DataSource for a GridView. As part of the users functionality, I allow the user to provide text to act as a filter on the GridView. My problem is I don't know of any feasible way to get feedback on the outcome of the 'filter' (i.e. objectDataSource.FilterExpression). In particular, the things I want to know are:
1. if any exceptions have been thrown (i.e. exceptions to do with the data-type of the values, or column names in filter expression), and
2. how many rows the DataSource evaluates to (i.e. there may be a DataSource of 600 records, which having a filter expression applied to it, returns 200 records).
Currently, when a new FilterExpression is applied to the ObjectDataSource, the following events are fired:
1. gridViewObjectDataSource_Selected - the select method specified in the ObjectDataSource (gets the whole 'returnValue'; in my case a DataSet).
2. gridViewObjectDataSource_Filtering - the event handler that fires before the filterExpression is applied to the above mentioned return Value.
From here, I expected a method to capture the *Filtered event. but there does not seem to be anything to accommodate this.
In the doco, there is a Note in the ObjectDataSource.FilterExpression Property entry (http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.filterexpression.aspx[^]), that seems to suggest that this functionality is not supported:
"You should validate any filter parameter value that you receive from the client. The runtime simply substitutes the parameter value into the filter expression and applies it to the DataSet or DataTable object that is returned by the Select method. If you are using the FilterExpression property as a security measure to limit the number of items that are returned, you must validate the parameter values before the filtering occurs."
So my questions are:
1. is there functionality in the ObjectDatSource to get the above mentioned feedback after a FilterExpression is applied? - and if not,
2. Is there a way to determine these details manually? (i.e. get the DataTable, and apply the filterExpression to it in the same way that it is done in the ObjectDataSource?)
cheers
|
|
|
|
|
Do you have the idea of integrating the MasterPay(the payment gateway) with our website.
|
|
|
|
|
Hi,
Can anybody let me know how to send the NewsLetter in ASP.NET
|
|
|
|
|
|
Hi all,
I have a problem when deploy a website on IIS. When i deploy and run website through VS2005, i got no problem but when i run that website on IIS, i have error that website can't connect to database.
Please help me to solve that error
|
|
|
|
|
hi
I have some problem with sqlbulkcopy,
It showing some error
the error is
Received invalid column length from bcp client.
My source table is msaccess and desitnation table is sqlserver2000
thanks
|
|
|
|
|
i think u have row contains data bigger than the size of the destination column....try to rais the size....
|
|
|
|
|
Hi
thanks now working fine
regards
rajmani
|
|
|
|
|
Hi
What is synchronization and asynchronization in asp.net?What is the
difference between then?Can anybody tell me with example?
and also what is interfaces?
Thanks.
Rahul
|
|
|
|
|
|
Hi Michael
Can u tell me how can we use synchronization in asp.net.
Any example in which synchronization is used or some code
to read.
Thanks.
Rahul
|
|
|
|
|
Hi,
I have a repeater and bound one of my tables to it. This table has a boolean value (true/false). I don't want that to be displayed as true/false on my webpage. Is there a way of changing it? It is currently displaying true/false.
Thanks.
Desmond
|
|
|
|
|
u cant add column to the DataTable and then put the table into for loop
if(dt.Rows[i][0]=="True")
{
dt.Rows[i][NewColumnIndex]="WhatEver";
}
else
..........
and u can delete the boolean column
regards
|
|
|
|
|
Hi:
i am getting below error message frequently. please hep me out on this.
thanks in advance.....
Exception of type System.OutOfMemoryException was thrown.
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 it originated in the code.
Exception Details: System.OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[OutOfMemoryException: Exception of type System.OutOfMemoryException was thrown.]
[HttpException (0x80004005): Exception of type System.Web.HttpException was thrown.]
System.Web.HttpAsyncResult.End() +54
System.Web.SessionState.SessionStateModule.EndAcquireState(IAsyncResult ar) +18
System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +80
|
|
|
|
|
|
Hi,
I am using asp.net, C# (visual studio 2005).
I have made one search form where I display large size image along with data.
My problem is when I export it to excel. Picture exported to I think on first cell.
Please suggest me some idea how can I rectify it.
Or is there better way available. Like exporting to word or pdf . if so please provide me some good link.
Please guide me
Thnks
imaran khan
|
|
|
|
|
Dear all,
I had used partial class to extend typed dataset(ex. add a method to TypedDataTable) in my windows-base applications and it works well.
But when I try it in a web services project, those extend functions which is visible within web project, but invisible to client.(I create a windows-base application then add web references point to that web project, client application will not be able to use extend function, properties etc.)
Is it true that Extending a Typed DataSet Using Partial Classes is not available in Web Services Project ?
Or is there anyway to enable it ?
Thanks for help.
|
|
|
|
|
Hi,
How can I use the autocomplete capability of dropdownlist in web application,
so that When I type in it, the math item brings up.
Best wishes
|
|
|
|
|
I don't thnk there's a control built in for this, but I suspect the ASP.NET AJAX library would have one.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
mehrdadc48 wrote: How can I use the autocomplete capability of dropdownlist in web application,
so that When I type in it, the math item brings up.
Dropdownlist?
I think this feature is already supported in firefox, IE7.
One people asked us about that in forum. You can check here.
Solution for IE6.
<script language="javascript" type="text/javascript"><br />
var pressedKeyString = "";<br />
var delay = 1000;<br />
var timeID = null;<br />
function move(){<br />
<br />
var selectList = document.getElementById('DropDownList1');<br />
var arr = new Array();<br />
<br />
var idx = 0;<br />
<br />
for(var i = 0; i < selectList.options.length-1; i++){<br />
if(selectList.options[i].value.length >= pressedKeyString.length){<br />
if(pressedKeyString.toLowerCase() == selectList.options[i].value.substring(0,pressedKeyString.length).toLowerCase()){<br />
selectList.selectedIndex = i;<br />
i=selectList.options.length;<br />
<br />
}<br />
}<br />
}<br />
<br />
pressedKeyString = "";<br />
}<br />
<br />
function foo(e,id){<br />
if(timeID != null)clearTimeout(timeID);<br />
timeID = setTimeout("move();",delay);<br />
<br />
var key;<br />
if(window.event)
{<br />
key = e.keyCode<br />
}<br />
else if(e.which)
{<br />
key = e.which<br />
}<br />
<br />
var pressKey = String.fromCharCode(key);<br />
pressedKeyString += pressKey;<br />
<br />
<br />
<br />
}<br />
</script><br />
<br />
<br />
DropDownList1.Attributes.Add("onkeypress", "foo(event,'" + DropDownList1.ClientID + "');");<br />
<br />
List list = new List();<br />
list.Add("Alien");<br />
list.Add("Emos");<br />
list.Add("Emos2");<br />
list.Add("Poker");<br />
list.Add("Peter");<br />
list.Add("Michael Sync");<br />
list.Add("Petro");<br />
list.Add("Pet");<br />
list.Add("Elizabeth");<br />
list.Add("Kiran");<br />
list.Add("Kate BackInSales");<br />
<br />
DropDownList1.DataSource = list;<br />
DropDownList1.DataBind()<br />
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi there
i have a asp.net app and i can;t make it work on my machine
IIS is working
SQL server 2000 is on
i have attached the database through visual studio 2003 i have access to it but in thew servers panel i get data source not found
though i can modify my db and i can browse the .aspx files but ofcourse i have no communication with the database,so nothing works...
i 'm fresh to asp and i really need your help
thanks
ninja coding
|
|
|
|
|
i couldnt get your quiestion.. expplain wat u did?
Sarith...
|
|
|
|
|
i connected to the database regularly ok ?added the database through server explorer
the connection string sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
and
<add key="CONNECTION_STRING" value="workstation id=xrono;packet size=4096;data source=XRONO;integrated security=SSPI;persist security info=False;initial catalog=Course_Data">
and i get "data source not found" right below my SQL Server name ,in the Server Explorer[v.Studio 2003]
i use Windows Authentication
Where did i go wrong?
PLease help
Thanks
ninja coding
|
|
|
|
|
did u tried data source= localhost
Sarith...
|
|
|
|
|
did u tried data source= localhost
and why u r trying to give conection through server explorer do it using code.
Sarith...
|
|
|
|