|
Hey all,
I've got a gridview that is binding images with a 100% width.
The image stretch fine in IE10, Chrome and FF, bit in IE7 the image is its original size.
Is there any workaround for this issue?
|
|
|
|
|
Dear all,
I am currently an novice user in the asp.net environment and would like to request assistance on the following topic below:
I am using 'c.Cover' as field name from database table, which has three types (i.e. talk, cvr, trd). I would like to filter my query, so it prints out yesterday's data with only cvr and trd types only.
from the code below, I am unable to filter my data using the following link below. I still not getting the correct response output from the client side.
http://localhost:38853/api/test?type=CVR&TRD</a>[^]
public IEnumerable<database_WICs> GetPriceType(string type)
{
DateTime yesterday = DateTime.Today.AddDays(-2);
var data = from c in db.database_WICs
where c.UploadDate <= yesterday &&
c.Cover == type &&
c.Cover == type
select c;
return data.ToList();
}
Any help would be much appreciated.
Many thanks for your time and help.
|
|
|
|
|
There are a few issues. The ampersand "&" actually separates parameters from each other. Consequently, type has the value of CVR only, and there is a second parameter named TRD without extra information. You need a different separator, what about a pipe | or + or....
Next, you do not want to get elements where the Cover column has both values at the same time - that does not make sense. It is sufficient when one of them matches. In boolean operators, that is an OR .
Instead of
c.Cover == type &&
c.Cover == type
you'll need a
(c.Cover == type1 ||
c.Cover == type2)
Note that you have to split the type parameter into type1 and type2 .
|
|
|
|
|
First - your localhost can't help us!!!
Second - yesterday is today -1 not -2!!!
Third - you pass in type and do
c.Cover == type && c.Cover == type
what you mean is
c.Cover == "cvr" || c.Cover == "trd"
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Hello,
thank you so much for your response.
I updated my code but now I am expericing the an application error:
A potentially dangerous Request.Path value was detected from the client
public IEnumerable<database_BWICs> GetDatePrice(string type, string trd)
{
DateTime yesterday = DateTime.Today.AddDays(-1);
var data = from c in db.database_BWICs
where c.UploadDate <= yesterday &&
c.Cover == type ||
c.Cover == trd
select c;
return data.ToList();
}
http://localhost:38853/api/daily/type=cvr&trd=talk[^]
I am working on putting the application onto the server. Please bear with me, I shall forward you an appropriate link in couple of minutes time.
Thank you for your time and help.
|
|
|
|
|
|
Thank you once again for your reply, I manage to update my code again, by adding spit function, but the api is still reading the first type. I removed the date parameter, so I can get the code to output only the types 'cvr' and 'talk' data types.
I am still struggling to get the correct output.
Any help would be very much appreciated.
[HttpGet]
public IEnumerable<database_WICs> GetPriceType(string type)
{
var trd = type.Split('&');
var data = from c in db.database_WICs
where trd.Contains(c.Cover)
select c;
return data.ToList();
}
|
|
|
|
|
The LINQ code is looks just right.
It is possible that type does not get the expected value?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Rather than implementing the filtering yourself, you might want to look at OData[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Changing the language of the site to Hebrew sets the .net culture appropriately (culture="he-IL"). However, the text "File Name: 002.txt" in Hebrew isn't coming up correctly 002.txt
שם קובץ: 002.txt
|
|
|
|
|
Can you show how the name comes to be part of the page you display?
It's highly possible that you need something like
<body dir="rtl">
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
|
Hey all,
I have created a blog where all the posts are stored in MS SQL.
I have created user-friendly url for each of the post using ASP Routing.
My question is, how do I submit the dynamic pages urls to google? Do I have to dynamically add the post url to the Sitemap and submit it to google when there is a new post?
Thank you in advance
|
|
|
|
|
I tend to use a dynamic sitemap file generated by a generic handler (sitemap.ashx ). Google re-reads the file on a regular basis, so there's no need to re-submit it.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you for you response
So I only have so submit it once so that google knows about the handler, correct?
|
|
|
|
|
That's been my experience using their Webmaster Tools[^]. It's also a good idea to add the link to your robots.txt file, so that other search engines will pick it up:
Sitemap: http:
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks a mil!!
|
|
|
|
|
Hi:
I had tried to draw horizontal line in gios pdf report.Please Help ME
|
|
|
|
|
I need to give a dashboard in asp.net(with or without ajax / telerik) for production data like machine efficiency, total production,machine utilization, different type of products etc. Can some one help me with some design idea or templates(i have already seen sales dashboard,executive dashboard by telerik)
Please help.
ashish sharma
|
|
|
|
|
ashu2001 wrote: i have already seen sales dashboard,executive dashboard by telerik I think that's enough. Anyway check this one.
Simple Dashboard[^]
All you have to do is customization.
thatrajaNobody remains a virgin, Life screws everyone
|
|
|
|
|
@thatraja Thanks for the reply but i saw this dashboard as well. but its design is not so appealing for me i want to explore some more option.
ashish sharma
|
|
|
|
|
Dashboard for web forms or MVC ?
Regards,
CodeBlack
|
|
|
|
|
Web forms only no MVC or LINQ
ashish sharma
|
|
|
|
|
|