|
The ObjectDataSource.SelectCountMethod Property just gives the name of the method to get the SelectCount.. I want the actual select count.
Here's some more information:
I am getting the e.ReturnValue from the ObjectDataSource Selected event. The ObjectDataSource is hitting a Data Access Layer that returns a List of Products:
public static List GetProducts(int maximumRows, int startRowIndex, string sortExpression, int categoryId)<br />
...
I'm only getting the records I need from the database by page with this DAL method. I'm then using a
ObjectDataSource SelectCountMethod to get the total number of products in that category (ALL pages):
public int TotalNumberOfProducts(int categoryId, string sortExpression)<br />
...
The thing I really want is to get the value of the TotalNumberOfProducts in that category without hitting the database again. I should be able to get that from the ObjectDataSources Selected event or is there somewhere else where I should be trying to get this value?
Any suggestions would be very helpful! Thanks.
|
|
|
|
|
Im using asp.net 2.0 with sql server 2005, My date from teh web form is of teh format
dd/mm/yyyy. This date when saved in SQL Server is saved as dd/mm/yyyy 00:00:00 AM or dd/mm/yyyy 00:00:00 PM.
I want to construct a query from aspx using a date range. The query is not working
See my Query Syntax below
"Select * From table where myDate between " & Date.Parse(DateCtr1) & " And " & Date.Parse(DateCtr2)
How can i save my Date from teh WebForm to include the Date And Time?
t.aransiola
|
|
|
|
|
You have the same question posted in this forum with different titles. Please delete one.
__________________
Bob is my homeboy.
|
|
|
|
|
Im using asp.net 2.0 with sql server 2005, My date from teh web form is of teh format
dd/mm/yyyy. This date when saved in SQL Server is saved as dd/mm/yyyy 00:00:00 AM or dd/mm/yyyy 00:00:00 PM.
I want to construct a query from aspx using a date range. The query is not working
See my Query Syntax below
"Select * From table where myDate between " & Date.Parse(DateCtr1) & " And " & Date.Parse(DateCtr2)
How can i save my Date from teh WebForm to include the Date And Time?
t.aransiola
|
|
|
|
|
'not working' probably means it loses the last day because the time is defaulting to 12:00 am. Just set the time to 11:59:59 pm on the second date you pass in, and it will work fine.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Are your database fields DateTimes or strings (varchars)? Assuming you are using DateTimes:
"SELECT 8 FROM table WHERE (myDate >= CONVERT(DATETIME, '" & Date.Parse(DateCtr1) & "', 102)) AND (myDate <= CONVERT(DATETIME, '" & Date.Parse(DateCtr2) & "', 102))"
|
|
|
|
|
I am using a CSS menu. How do i control .aspx pages that will be accessible / opened by different category of users.
t.aransiola
|
|
|
|
|
I have no idea what you are asking. How to navigate to pages with the menu? How to apply CSS to the pages?
only two letters away from being an asset
|
|
|
|
|
By building a permissions system, and by dynamically building your menu, or having set menus for different classes of user.
Your pages need to reject users that don't have permission, in case the page is entered manually or bookmarked.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
How can i Accessing elements of a form inside javascript. I want to change the vissible properties of some grid controls inside a javascript.. Please any one help me in this
Thanks & Regards,
Uma Shanker.K
|
|
|
|
|
Your .NET controls are given names that are different to the names you give them on the server side. So you need to add script like this:
var myControlId = '<%=myControl.ClientID%>';
Then you can write code that uses document.getElementById with the myControlId variable, and work from there.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
hi anybody knows how to use the file upload control as what i need is limit the file selection to images only and how to upload the file to a perticular folder in my webpage
|
|
|
|
|
|
hi i am currently trying to use a gridview control to view data from the database.
however one of the field is an image.
the format i need to display is: id(labelbox),image(imagebox)
but in the database my data is saved as id(text),pic(text,image name only like asd.jpg)
however my image is all in the image folder...
meaning i am trying to configure the imagebox in the gridview control to add the "image/" in front of the now image name.
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Pic") %>' Height="100px" Width="100px" />
this is what i got after changing the coulum to a template
now the imageurl is like imageurl="asd.jpg" how ever i need it to be imageurl="image/asd.jpg"
is there anyway to do this without on the below code?
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Pic") %>' Height="100px" Width="100px" />
|
|
|
|
|
you need to do this in the eval statement (from memory):
ImageUrl='<%# "image/" + Eval("Pic") %>'
|
|
|
|
|
Hi,
I'm trying to make a web based application but came to problem with printing on serial port from browser.
Maybe somebody knows any good activex componet or some other way to achive that possibility.
Sorry on my bad english.
Thanks in advance.
|
|
|
|
|
Hi All,
I created a site and made a virtual directory. I want to run it under IIS. But is always gives an error is that
The XML page cannot be displayed<br />
<br />
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.<br />
<br />
A name was started with an invalid character. Error processing resource 'http://localhost/cs/Default.aspx'. Line 1, ...<br />
<br />
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
-^
I have successfully registered my asp.net using
%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i"
but it still showing the same problem.
Is it not possible to run my site without having asp.net on my production machine/Server.
If yes then what r the requirements for that?
Any help is apprecited. Thanks
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
Have a look in IIS to make sure it's got an ASP.NET tab in the properties for the default site. If you've run regiis, I'd have to wonder if IIS is even running.
axn321 wrote: Is it not possible to run my site without having asp.net on my production machine/Server.
No, it's not possible to run ASP.NET if ASP.NET is not registered, and .NET installed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hello;
I added gridView to web page and dataSource is table stored in database
I I have cloumn in table of database type bit
so in gridView convert this coulm to templateFeild
then i make some change in this feild
-autopostback=true
-enable=true
and I want when user chech the checkbox change the value in databse
I have tried the following to get the datakey of gridView
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
System.Web.UI.WebControls.GridViewCommandEventArgs Erg = (System.Web.UI.WebControls.GridViewCommandEventArgs)e;
Response.Write(Erg.ToString());
Response.Write (String)Erg.CommandName);
}
but nothing change in web page posting without reuslt
?????
tkml123
|
|
|
|
|
have u written any thing related to checkbox in the pageload option. then checkbox value will be reset and u can't get the result.
just check it.
thank you
vijaya
vijaya
|
|
|
|
|
actully no...can you help me in this problem..
i just gave ....
tkml123
|
|
|
|
|
I need to loop through all the colors in System.Drawing.Color. Can anyone give me an example on how to achieve this?
Thanks
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
System.Drawing.Color doesn't implement IEnumarable
You will have to do something like this.
System.Drawing.Color c;
string[] colors = Enum.GetNames(typeof(System.Drawing.KnownColor));
foreach (string color in colors)
{
c = System.Drawing.Color.FromName(color);
}
|
|
|
|
|
Thanks
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Hi everybody,
I was developing an Windows Application that uses a USB device. To communicate with this device I needed a Handle to my application. That was fairly simple, I just used this.Handle in the Windows Form!
Now I want to build a web service that connects to the same USB device. Therefore, I need a Handle to my web service, but there is no such thing as this.Handle in HttpApplication! There must be a way of getting it, but I can't find it! Can anybody please help me?
Thanks!
|
|
|
|