|
No, I did think that would be how I could access it from the BLL but it's not available for some reason.
Thanks for the suggestion though. Any other ideas?
Thanks,
|
|
|
|
|
I found the problem, basically I'm using a different project for my Business Logic so needed to import the System.Web assembly into the class to access the Httpcontext class. It's actually bad practice to use the httpcontext I guess as it then requires a web front end but in my case I'm going to use it anyway.
Regards,
Adrian
|
|
|
|
|
I need to display four GridViews at once, but the data they contain differs in each grid by one parameter. It seems clumsy to add four identical SqlDataSource controls, so is there some way I can re-use one?
|
|
|
|
|
you can use stored procedure and bind one sqldatasource to that stored procedure. you can write down all the four queries with different parameters into your stored procedure using if loop instead of using four sqldatasources.
for that you have to add one more parameter for identify the query from the loop.
for example:
@count int,
@a varchar(50),
@b varchar(50),
@c varchar(50),
@d varchar(50)
if(@count=1)
begin
Query1 with parameter @a
end
if(@count=2)
begin
Query2 with parameter @b
end
if (@count=3)
begin
Query3 with parameter @c
end
if (@count=4)
begin
Query4 with parameter @d
end
|
|
|
|
|
I am developing a system using asp.net 2.0. I have the application on a production server. I have made changes to the app. in my development environment and the changes work fine but when I transfer the changed app to my production environment the changes will not work. It is like the old suystem has been cached. I am hosting production on IIS 5.0 W2K server. I have even deleted the old app of the server and rebooted the server but it appears to still pick up the old application with no changes.
Anyone any ideas how to fix this?
macca
|
|
|
|
|
You cannot be deploying it properly, if you rebooted the server, IIS is restarting and there's nowhere for it to cache, you're just not deploying it properly. You must be deleting/changing the wrong folder.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Do you control the web-server? Could the site be being cached by a content acceleration server? If you re-name the folder on the website and can still hit the website then there is something wrong .
I would double check IIS to make sure it's pointing at the right location. If it is, then create a test HTML page in the root and try to access if from the site. If you can see it you know the website is working. Then update that file and see if you can see the updates. If you can then I agree, it must be something you're doing with the release of the new code.
Thanks,
Adrian
|
|
|
|
|
Hello,
I have a ASP.NET web form that I wanting to display data from a database. Right now I am using the gridview. Is this good to use for future maintenance? or is there a better method to use in order to work with database updates. Would it be better to add a 'table' to the web form and somehow connect it to the database? Do any stored procedures need to be created?
Non-sarcastic answers please Suggestions/ideas are very much appreciated. Thanks!
using C#
MS Server 2003
databasename: UserRequestDatabase
|
|
|
|
|
|
eyeseetee wrote: apply to session then put the session to a textbox or label and put where you want
What???
eyeseetee wrote: if you put the data into a datatable then you can display the datat however you want using c#
Or leave the data in a dataset, list, collection, or any number of containers. What a useless answer.
eyeseetee wrote: you dont have to display your data in a gridview
The only thing you should have said.
only two letters away from being an asset
|
|
|
|
|
|
|
Well I haven't been in this forum much since I haven't done any web development for several years. I am currently doing an ASP.NET 2.0 project so will be around a bit more. I see this forum is very similar to the others I frequent.
|
|
|
|
|
Yep. Wish Chris would hurry up implementing the idiot filter
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: Yep. Wish Chris would hurry up implementing the idiot filter
Why would you want that to happen you wouldn't be able to hang around this forum spending all day picking holes in other people's posts
|
|
|
|
|
This is *hilarious*
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
AhLaJ77 wrote: Is this good to use for future maintenance?
It is neither good nor bad. If your code is separated into appropriate layers then you can change teh presentation or data without effecting the other.
AhLaJ77 wrote: Would it be better to add a 'table' to the web form
GridView is already a table. Look at the source that is generated.
AhLaJ77 wrote: Do any stored procedures need to be created?
No stored procs are necessary to use a gridview, or any other display mechanism. The presentation is, or should be, only about displaying data that has already been obtained.
AhLaJ77 wrote: Non-sarcastic answers please
Without those you'd get now responses at all
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: GridView is already a table. Look at the source that is generated.
I think you will find a gridview is a grid, not a table
|
|
|
|
|
Ok, now you brought it on yourself, ID10T.
eyeseetee wrote: I think you will find a gridview is a grid, not a table
So tell me where is grid in the W3C HTML standard http://www.w3.org/html/[^]
<br />
From aspx<br />
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" <br />
AllowSorting="True" DataSourceID="SqlDataSource1"><br />
</asp:GridView><br />
<br />
As rendered in html<br />
<table cellspacing="0" rules="all" border="1" id="GridView1" style="border-collapse:collapse;">
Now, go away leave this to the professionals.
only two letters away from being an asset
|
|
|
|
|
|
Wow - the boy sure is dumb, isn't he ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
So...all and all which is the best method u suggest that I should use when it comes to displaying data on my Request Form ? Thanks!
modified on Wednesday, March 19, 2008 4:23 PM
|
|
|
|
|
All in all, there is no "best" method. The best method is the one that fits your needs.
only two letters away from being an asset
|
|
|
|
|
One other thing to add to this hilarity...
If you're concerned about using the gridview control, the best bet is the repeater. They are opposite ends of the spectrum - gridview gives you a LOT of stuff for free, the repeater, gives you nothing. The benefit of a repeater is that you have total control over the HTML that gets spit out, you don't even need to use a table ( which all these other controls are going to use ), so it can be used to emit, breadcrumbs, or any other format you'd like.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: use a table ( which all these other controls are going to use ),
but I thought the GridView was a grid, not a table Now I'm just all confused, I'd better go buy some ASP.NET books.
only two letters away from being an asset
|
|
|
|