|
thatraja wrote: Re-check
Now there is a major assumption!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
|
You need to put runat="server" on the tag if you want to access it in C#.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
1,add
runat="server" to your img tag, this let your C# code can access your tag;
2,in your C# code, use
this.img1.src to access the img source attr.
this method can using in all html tags
|
|
|
|
|
hi i am intresting web devlopment but i confused which programming is better?
plz replay
my prefrce is 1. php
2. asp.net
|
|
|
|
|
You should have searched Google first. Check this
PHP vs ASP.net Comparison[^]
Besides it's better to choose based on your interest & past experience(For example, If you're VB6 or Classic ASP guy then go with ASP.NET.)
|
|
|
|
|
And what answer do you really expect asking such question on asp.net forum?
--
"My software never has bugs. It just develops random features."
|
|
|
|
|
I have not used PHP but to get your answer you should research samples of both kinds and see what syntax you feel comfortable with. Perhaps search job possibilities. I believe, but could be wrong, that ASP.Net will provide better job opportunities, at least for now.
I would recommend doing both. Get a job doing one and then do hobby work using the other.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I write in both PHP and asp.net now.
I took on a PHP project after not writing a line of PHP code in 6 years.
I like asp.net better, more control over what you can do. Teaches you better discipline and practices in writing good solid valid code. Working with strings is easier, because you can read files in one format, and convert it to another. I think good ASP.Net Programmers are better in the long run than PHP script writers.
So funny, I'm writing PHP right now at the moment. Picking PHP back up was pretty easy. PHP is a lot different, You write code to get data, manipulate data and test against operators, and then literally echo or spit out HTML.
In my opinion,
one of the pros to PHP is that there are more PHP jobs out there in my area to make money from than ASP.Net jobs. Nobody uses ASP.net where I live. The PHP jobs are very easy, because so many PHP people in my area think there really good, but lack the discipline or knowledge of how to encode and decode strings. Don't know what UTF-8 is, Unicode versus char character sets and so forth, The list goes on and on.
Seems like you can do things faster in PHP because it's so forgiving. But don't get stuck in the MySQL world or LAMP environment.
I really don't have a suggestion for you at the moment, and I'm not really that partial to one or the other anymore, 4 years ago yes I was to asp.net.
I think learning C++ actually made me a better programer for both PHP and ASP.Net. Regardless of which one you choose, it will take some time to really get good at it!
[update]
I agree with Ryan, the post above, and learn both at the same time. This way you can take advantage of more jobs that come up in your area. I think taking a side road by learning c++ and writing a Win32 app will propel you forward faster towards PHP and Asp.Net. It will teach you that you have to measure the size of everything, and to not waste resources like memory. Once you see how hard c++ is, writing the others will be easy.
modified 8-Dec-13 0:34am.
|
|
|
|
|
See the code below: I want to substitute some HTML code by a HTML / asp control, e.g.
<a class="thumb" name="1" href="Images/MapGallery/Large/Metro Service Area Dispatcher Calls Map_L.jpg"
title="Metro Service Area Dispatcher Calls Map" >
How to do it? Thanks.
|
|
|
|
|
Not clear, explain clearly with an example.
|
|
|
|
|
ASP:Hyperlink is the asp version of an a tag.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Dear all,
I am writing to seek help in writing a linq 'Where' clause to get results between two dates. I am using the following method below, which is currently showing an empty string.
[HttpGet]
public IEnumerable<database_WICs> GetDate(DateTime? start, DateTime? end)
{
var data = from c in db.database_WICs
where c.UploadDate == start &&
c.UploadDate == end
select c;
return data.ToList();
}
http://localhost:45361/api/data?start=25/11/2013&end=28/11/2013
Any help would be very much appreciated.
Many thanks
|
|
|
|
|
try this
[HttpGet]
public IEnumerable<database_WICs> GetDate(DateTime? start, DateTime? end)
{
var data = from c in db.database_WICs
where c.UploadDate == (start==null? c.UploadDate : start) &&
c.UploadDate == (end=null? c.UploadDate : end)
select c;
return data.ToList();
}
|
|
|
|
|
Thank you so much for your response. I tried your code and I am sorry to inform, I got the following error "Cannot convert null to 'bool' because it is a non-nullable value type"
Any help would be very much appreciated.
|
|
|
|
|
miss786 wrote: get results between two dates
miss786 wrote: c.UploadDate == start && c.UploadDate == end
The query you've written will only return records where the UploadDate is equal to the start parameter AND equal to the end parameter. Unless you pass the same value for both parameters, this condition will never be met.
Try something like this:
var data = db.databases_WICs;
if (start != null)
{
data = data.Where(c => c.UploadDate >= start);
}
if (end != null)
{
data = data.Where(c => c.UploadDate <= end);
}
return data.ToList();
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I really appreciate your time and help. I am currently experiencing error:
Cannot implicitly convert type:'System.Linq.IQueryable<api_09oct.database_wics>' to 'System.Data.Entity.DbSet<api_09oct.database_wics>'. An explicit conversion exists (are you missing a cast?)
on the following lines of code:
if (start != null)
{
data = data.Where(c => c.UploadDate >= start);
}
if (end != null)
{
data = data.Where(c => c.UploadDate <= end);
}
I tried adding FirstOrDefault() to the code but I am sorry to inform that I can not figure out the reason for the issue above.
Thank you
|
|
|
|
|
Try either:
var data = db.databases_WICs.AsQueryable();
or:
IQueryable<database_WICs> data = db.databases_WICs;
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks Richard once again, you have been a great help. I manage to get the issue resolved and the problem was in date converter code that was in the Global.asax file which was not allowing the date parameters to pass through the URL query string.
Thank you so much for your help and time into this issue. I really appreciate it.
|
|
|
|
|
while surfing on internet I found, we can use multiple web.config files in a project. So I want to know how it will work. Which web.config file will refer. Plz give example
|
|
|
|
|
|
I would recommend against it unless you need to. You can't have multiples in the same folder for obvious reasons but sometimes you may want to overwrite a setting in the parent web.config in a subfolder. You may want to research web.config inheritance or better yet, just avoid doing it.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
The root web.config will come first. then if you want to override the settings then you can have more web config in specific folder(View/WebPage folder). if any folder does not have the 2nd web.config then root settings will be affected for your request.
|
|
|
|
|
First of All this is my first if any mistake or wrong message forgive me. coming to Answer, of course we can used the multiple web.config in asp .net web project. Suppose in my project fifty Pages(50), some page are Access only Admin and Some Page access Valid user like that we can used our account information in Code project Account and some are access every user like that About Us page,Login page and So on.My project Pages are divided three parts and Make a Three Folder in Project like name "Admin","Valid User" and Every user. In Admin Folder Add Web.config and Edit the Web.config some change are
<authorization>
<allow users="*" roles="admin"/>
<deny users="?"/>
</authorization>
after than save this web.config.This step are do every folder and save project.
I hope my Bit information try solve your problem.
|
|
|
|