|
|
Nice AJAX sample here[^]. You will find many others if you do a search.
|
|
|
|
|
Hi all,
i am developing an website in asp.net c#.
i want to select the data from database on the basis of name passed in the url,e.g
suppose this is URL: domain_name.com/abhishek-singh
and i want to select and display the data of "abhishek-singh" from the database.
How can i do this.
Please suggest.
|
|
|
|
|
|
|
|
Hi Friends
I have multiple datatables, and the datatables may or may not have data, depends on the user selection.
I have to get Cartesian Product of all the Datatables, and pass the Cartesian Product result as datasource for Gridview.
I am using following code which is working fine if all the DataTable has rows. If any of the table is not having row, then I am getting no records in my resultant cartesian product table. Please help in this.
var newDatatable = from TowerName in dtTower.AsEnumerable()
from CountryName in dtCountry.AsEnumerable()
from Level in dtLevel.AsEnumerable()
from CityName in dtCity.AsEnumerable()
from BandName in dtBand.AsEnumerable()
from EType in dtEmploymentType.AsEnumerable()
from Skill in dtSkill.AsEnumerable()
select new { TowerName, CountryName, Level, CityName, BandName, EType, Skill };
DataTable dtlinq = new DataTable("poclinq");
foreach (var item in newDatatable)
{
DataRow dr = dtlinq.NewRow();
dr["TowerName"] = item.TowerName.ItemArray[0];
dr["CountryName"] = item.CountryName.ItemArray[0];
dr["Level"] = item.Level.ItemArray[0];
dr["CityName"] = item.CityName.ItemArray[0];
dr["BandName"] = item.BandName.ItemArray[0];
dr["EType"] = item.EType.ItemArray[0];
dr["Skill"] = item.Skill.ItemArray[0];
dtlinq.Rows.Add(dr);
}
|
|
|
|
|
priyaahh wrote: If any of the table is not having row, then I am getting no records in my resultant cartesian product table.
The Cartesian product of any set with the empty set is the empty set. That's fairly basic set theory.
You'll need a custom extension method which will return a single empty row if the table is empty:
public static class DataTableExtensions
{
public static IEnumerable<DataRow> AsEnumerableNotEmpty(this DataTable table)
{
if (table == null) throw new ArgumentNullException("table");
if (table.Rows.Count != 0) return table.Rows.Cast<DataRow>();
return new[] { table.NewRow() };
}
}
You'll then need to change your LINQ query to call the custom method:
var newDatatable = from TowerName in dtTower.AsEnumerableNotEmpty()
from CountryName in dtCountry.AsEnumerableNotEmpty()
from Level in dtLevel.AsEnumerableNotEmpty()
from CityName in dtCity.AsEnumerableNotEmpty()
from BandName in dtBand.AsEnumerableNotEmpty()
from EType in dtEmploymentType.AsEnumerableNotEmpty()
from Skill in dtSkill.AsEnumerableNotEmpty()
select new { TowerName, CountryName, Level, CityName, BandName, EType, Skill };
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hi Richard,
Thanks lot for your response, it working for me.
Regards,
Priyaa.
|
|
|
|
|
Here's is how it can be done if you have dedicated host
http://stackoverflow.com/questions/2333149/how-to-fast-get-hardware-id-in-c
However, in shared hosting environment, generally references to System.Management is restricted.
Any suggestion? I hesistate to, for example, rely on just IP address...
dev
|
|
|
|
|
And why do you have such an idea as finding out hardware ids of a web server????????? Why do you need that? Hosting companies often use virtualization - and your application could seamlessly be moved from one "computer" to a different one, just as load balancing, failover, whatever require.
|
|
|
|
|
for dedicated host, hosting admin would have root access to your machine and thus can get to our asp.net app which churn out "Evaluation Licenses". As mean to lock the app to a particular machine, we generate a license. The app only works if running on the dedicated hardware.
Now with shared hosting or virtual machine, this won't work. Do you have something to suggest? Have you implemented any licensing/locking scheme that'd work in shared hsoting environment, virtual machines? or cloud? where hardware id not viable?
dev
|
|
|
|
|
Hi All,
I am saving the image to particular folder programmatically. When saving the images it has different formats ,I want to save the all images into a single format which doesn't loose the resolution
Can any one help me how can I solve the issue
Thanks,
Siddiqali
|
|
|
|
|
Where is the problem? You can set the desired format as a parameter in the Save method:
System.Drawing.Bitmap bitmap = ...;
string filename = ...;
bitmap.Save(filename, System.Drawing.Imaging.ImageFormat.Png);
|
|
|
|
|
Hy to everyone!
Can anybody help me to make a image viewer !
I am at the point that i get the images paths from the database i store them in a list string, then i want to use a javascript or something else slideviewer to show the images.
I tried the slide from slideshow.triptracker.net/slide.js
It starts the slide but it doesnt show the images it stand at the point of loading or charging the images.
If is another way please show me how!
I just need to do that imageviewer!
Thank you in advance!
|
|
|
|
|
You might want to ask the author of that control for help.
Check if they have a forum or something.
|
|
|
|
|
I tried to find any possible way to talk to them but i didnt.
Can you please show me another way to make the slideshow ?
|
|
|
|
|
|
Thank you!
Can i do it with devexpress 10 or do i have to use a newer version of devexpress!
|
|
|
|
|
Dear All,
When we try to bind more 1000+ records in gridview other page controls events not firing.Please don't ask me to give paging for gridview because from gridview only we are inserting all the records into database.Please Help me
Thanks.
|
|
|
|
|
Paging is the way to do it; you should not be expecting your users to search through thousands of records to find the information they are interested in. Having said that, we have no idea what your code is doing so cannot begin to guess what your problem is.
Veni, vidi, abiit domum
|
|
|
|
|
Dear Richard MacCutchan,
Thank you for your suggestion.But my user need to search from all 1000+ of records because in gridview we are using jquery client side column filter.When we try to load around 500 records into gridview that time every thing going smooth.Please Help me out.
Thanks.
|
|
|
|
|
OasisSoft wrote: Please Help me out. With what? We have no idea what your code is doing, let alone what is wrong.
Veni, vidi, abiit domum
|
|
|
|
|
User will enter Customer Code based on the customer code all batches will bind into gridview (Which have 1000+ records) these (gridview)values should insert into another table
|
|
|
|
|
i have a web site with some sub domain for rewriting i use this code in web confic.
<pre lang="c#">
<if header="HTTP_HOST" match="^(?:www\.)?([^.]+)\.([^.]+)\.([^.]+)$"> <set property="subdomain" value="$1"/> <set property="domain" value="$2"/> <set property="tld" value="$3"/> <rewrite url="~/Default.aspx" to="~/userPage.aspx?pagename=${subdomain}&defaultpage=yes" processing="stop"/> <!--<rewrite url="~/Default.aspx" to="~/Default.aspx" processing="stop"/>--> </if>
</pre>
<pre lang="css">when i test website with this address everything is good: http://www.sub1.mysite.com/coHome.aspx
But when i want to test this address: http://www.sub1.mysite.com
doenst work rewrite</pre>
|
|
|
|