|
I am using Visual Studio 2005 Professional Edition to create a WebSite and Crystal Reports that come with it to create my reports. My problem is that when I add a new Crystal Report item, I only find three experts i.e. Standard, Cross-Tab, and Mail Label. I cannot find the Drill Down expert. What am I missing?
|
|
|
|
|
HI Every1
I have two questions.
!st one is: I am using dataset and fill this dataset in ISPOSTBACK event.On button click event,I want to bind datagrid with this dataset but when i click on this button,data is lost.Is it possible?
I declared dataset as public.
2nd one is:How to use datacache in appliction?I want to fill dataset in global.asax page in application_start event.I want to store this dataset into datacache?how can i do this?Pls if u have any ans,pls reply me.
Thanxs
monika.
|
|
|
|
|
hi,
Well I can help you with your 1st question,
Your can add this dataset either in Session or ViewState
Example.
ViewState.Add("Name for ViewState",Your dataset name) or
Session.Add("NAme for Session", datasetname)
With this i think solve your problem...
I m sorry for your second question.
Hopes it will work..
KHATRI
|
|
|
|
|
Hi,
I am working with asp.net 2.0. In my project, i am using a Design time DataSet (.xsd file). In TableAdapters i have Added a query which uses my existing Stored Procedure to retreive Data, Which accepts some Arguments. This method is below,
DALTableAdapters.ItemsTableAdapter.GetProductList(int?, int?, int?, int?, ref string, ref string, ref int?)
When i call this method from my Codebehind Class of the page,
DAL.ItemsDataTable items_dt = items.GetProductList(catId, brandId, page, '3', ref catName, ref brandName, ref numProducts);
For all the variables in the argument, i have already assigned some values.
While compiling, I am getting the following Error.
Argument '7': cannot convert from 'ref int' to 'ref int?'
How can i resolve this problem ?
Regards,
Jay
|
|
|
|
|
Hi there,
"ref int" and "ref int?" are different, see Nullable types[^], in this case you need to cast the numProducts to a variable of the nullable type int? before calling the method.
|
|
|
|
|
Thanks for your most valuable info.
It works fine, when i changed my datatype of numProducts local variable from int to int?
But i am experiencing this problem now only. In my StoredProcedure, i have passed all the parameters like this.
CREATE PROCEDURE GetProductsList<br />
@CategoryId INT,<br />
@BrandId INT,<br />
@PageIndex INT,<br />
@NumRows INT, <br />
@CategoryName nvarchar(50) OUTPUT,<br />
@BrandName nvarchar(50) OUTPUT,<br />
@ProductCount INT OUTPUT<br />
<br />
AS<br />
<br />
BEGIN<br />
.........<br />
I am using this SP for SELECT method of my ObjectDataSource.
My doubt is, Why the @ProductCount needs to be declared as int? ? No string? for @BrandName
And WHY all the OUTPUT variables are passed as Reference??
-- modified at 3:14 Saturday 23rd September, 2006
Regards,
Jay
|
|
|
|
|
Hi all
I have a dropdownlist on my page but it is always showing the value rather than the text. For example:
<asp:DropDownList runat="server" id="filter">
<asp:ListItem value="1">Filter 1</asp:ListItem>
</asp:DropDownList>
This will produce the dropdownlist but the text shown will be 1 rather that filter 1 . This happens when the listitem is declared as follows as well:
<asp:ListItem value="1" text="Filter 1" />
Any ideas on why this is happening??
The project that this page is part of uses nested master pages if this sheds anymore light.
Thanks in advance.
|
|
|
|
|
Hi,,
I tried with the same coding in a new web page and it showed "Filter 1" correctly, rather than "1" as u mentioned...
Regards..
sdaniel_cst
|
|
|
|
|
Cheers for the reply
I have also tried with the same code in a new project now and it works. Suppose this project is just being funny with me
thanks again
|
|
|
|
|
hy
i habve a datagrid and i wanth to make some columns invisible and "Datagrid.Columns(2).visible = False" isn't working..
Can someone tell me why or show me another way 2 do this?
i am using vs 2005
plz help
10x
|
|
|
|
|
I usually do this in the GridView's RowDataBound event. (Or if you are indeed using a DataGrid instead of the GridView it is the ItemDataBound event. Personally, I don't use the old DataGrid objects anymore.) For a GridView the code would look something like this:
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
Select Case e.Row.RowType
Case DataControlRowType.DataRow
e.Row.Cells(0).Visible = False
End Select
End Sub
In this example I am hiding the first column in the grid only. If you need to hide another you would need to know the column index and add another statement like this:
e.Row.Cells(index).Visible = False
Hope this helps.
|
|
|
|
|
Using ASP.NET 2.0, say I want to store a picture in “C:\Users\user123\images\MyPortrait.jpg” on the server. How can I have the user access it through an aspx page? Because it seems I can only get the Image control to reference a url that is within the Website directory.
|
|
|
|
|
To make files accessible from the web you have to expose them through the web server. If you want to store the files somewhere outside the web root folder structure, you can create a virtual directory that exposes a folder somewhere else on the server.
---
b { font-weight: normal; }
|
|
|
|
|
I'm looking for something like:
Image CurrentImage = System.Web.UI.WebControls.Image.FromStream((byte[])dataReader["ImageStream"]);
However I'm not finding anything like that for ASP .Net pages and it appears you either have to reference another page and pipe the image from it or flush the stream to disk and then set the CurrentImage.UrlPath = Server.MapPath...
Anybody know how I can set an System.Web.UI.WebControls.Image = {Some type of function that will load a bufferred stream directly from memory.}?
Thanks!
- Rex
|
|
|
|
|
Hi Rex,
As you know that the Image server control renders to the img element at the client side and you would normally set the url of the image file in the ImageUrl property. In your case, if you want to display the image from the stream (or display inline image), you can encode the binary content as base64 string before setting the ImageUrl property in the format ImageUrl="data:image/gif;base64,R0hkgA0APfmAENOT..." If you search for "display inline image", Google could bring up some more information. However, the downside of this way is that only non-Microsoft browsers support it, (ah you can blame Microsoft for that) so you have to keep setting the url of an web page, http hanler with the id of the image so that you can pull it out later. Another option instead of writing out the image to disk is to save the image in memory such as Cache (with Cache you can set the time duration to kick it out), and you can send the image contents later in the ShowImage web page.
|
|
|
|
|
|
Hi All!
When I try to open a .asp page in ASP.net 2.0 I get followin error.
The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asp' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
Can classic asp page be opened in ASP.net 2.0.
Thanks
|
|
|
|
|
Please do not use bold on the entire message.
What do you mean when you say that you try to open the .asp page in ASP.NET? Do you mean that you try to browse to the page, or do you try to request the page from your ASP.NET code?
If you want to use ASP pages you have to configure the server to allow them.
---
b { font-weight: normal; }
|
|
|
|
|
Sorry for that.
I call .asp page on button click on the client side by using Window.open method of javascript. How to configure server to allow them. Might be I 've to override default ForbiddenHandler property for .asp page but completely not sure what to do.
Thanks
|
|
|
|
|
In the IIS manager, in the properties for the application, in the Home Directory tag, open the configuration. Make sure that there is a mapping for asp files, pointing to "C:\WINNT\system32\inetsrv\asp.dll".
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for the reply but this setting is already there and it is not working.Any idea what should I do?
|
|
|
|
|
Check the web.config and machine.config files to ensure that you haven't got the extension ASP mapped to System.Web.HttpForbiddenHandler. Check that you don't have the following:
<add verb="*" path="*.asp" type="System.Web.HttpForbiddenHandler">
Regards
Pete O'Hanlon
|
|
|
|
|
Hi I've checked this but HttpForbiddenHandler is mapped to .asp only in Dotnet 1.1 not in Dotnet 2.0 which I'm currently working upon.Any ideas what could be done.?
Regards!!
|
|
|
|
|
Are you browsing to the page through IIS, and not using the built in server in Visual Studio? The built in server has no support for ASP.
---
b { font-weight: normal; }
|
|
|
|
|
Ya You are right.Built in server does not support asp.IIS does.
Thanks!!
|
|
|
|