Jump to content

Search the Community

Showing results for tags 'net'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 3 results

  1. How i can filter List the data with Dictionary condition using linq. class Person { public string name { get; set; } public string subject { get; set; } public string type { get; set; } public int age { get; set; } } class Test { public void FindData() { // Create dictionary and add five keys and values. var conditionDictionary = new Dictionary<string, string>(); conditionDictionary.Add("subject", "english"); conditionDictionary.Add("type", "teacher"); List<Person> persons = new List<Person>(); persons.Add(new Person { name = "Rajul", subject = "math", type = "teacher", age = 20 }); persons.Add(new Person { name = "Jhon", subject = "english", type = "teacher", age = 25 }); persons.Add(new Person { name = "Nitin", subject = "english", type = "student", age = 21 }); persons.Add(new Person { name = "Sumit", subject = "english", type = "teacher", age = 26 }); persons.Add(new Person { name = "Komal", subject = "science", type = "student", age = 29 }); List<Person> filteredpersons = Filter(persons, conditionDictionary); } public List<Person> Filter(List<Person> persons, Dictionary<string, string> conditionDictionary) { /*TODO: can you suggest how to filter list data using linq with Distionary*/ var list = (from person in persons from condition in conditionDictionary select person).ToList(); return list; } }
  2. hello again, since im not sure this is php coding related, ill just go ahead and type in here.correct me if im wrong.. well, im using latest version of verot.net.its a script created for resize pictures and stuff like that, i have used it ALOT in the past.so i was thinking of using it for a project. and everything works just fine as i can see for now.all but the picture names. when i am uploading a picture, i would like to change the name to the user_id given in the database. i DO had succes with this also on the upload, but the trouble is with the picture.i just CANT in anyway and anyhow i try to change the freaking name once its moving to my server. its keeping the same name, and its pretty annoying -.-'... any ideas?...code below: if(!empty($_FILES['user_picture']))//allways form name...{$handle = new Upload($_FILES['user_picture']);//starting picture uploader..if ($handle->uploaded){ $handle->image_resize = true; $handle->image_ratio = false; //$handle->image_convert = gif;//a different pic format... $handle->image_x = 100; //Width in Pixels... $handle->image_y = 100; //Height in Pixels... $handle->Process('user_pics/'); $id = mysql_insert_id();//id just given in the database... //$image = $handle->file_dst_name;//avatar with real name... $image = $handle->file_new_name_body = $id;//avatar with changed name... (DOSENT WORK...) //mysql_query("INSERT INTO users (user_avatar) VALUES ('$image')"); mysql_query("UPDATE users SET user_avatar = '$image' WHERE u_id = '$id'");}}//end empty statement... thanks ALOT in advance!...
  3. Hi, I wonder if someone can help. I am trying within a WebGrid to create a link on the (using the HTML anchor tag) Asset Tag column - so then when the user clicks on an asset tag it directs them to a Display Report page - where it displays a transaction report on that particular asset. I have searched and searched the internet, and found the solution below. However it displays the following error message: Server Error in '/' Application. Object reference not set to an instance of an object.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Here is my code: var db = Database.Open("assetManagement"); var sqlExtractEventDescription = "SELECT * FROM [event]";}<h2>Devices</h2>@{if(addNewOutput.IsEmpty() == false){<p class="informationMessage">@addNewOutput</p><br />}}<a href="addNew.cshtml?type=device" class="button">Add New</a><a href="editExisting.cshtml?type=device" class="button">Edit Existing</a>@{var sql = "SELECT assetTag, imei, serialNumber, eventId FROM [device] ORDER BY assetTag";var data = db.Query(sql);var grid = new WebGrid(data, canPage: true, rowsPerPage: 10);grid.Pager(WebGridPagerModes.NextPrevious);}<div id="webGridDiv">@grid.GetHtml( tableStyle: "userWebGrid", htmlAttributes: new { id = "deviceDataTable" }, headerStyle: "header", alternatingRowStyle: "alt", columns: grid.Columns( grid.Column("assetTag", "Asset Tag", format: @<text><a class="button" href="@Href("~/reports/displayReport.cshtml?type=assetTag&assetTag=" + assetTag")">@assetTag</a></text>), grid.Column("imei", "IMEI"), grid.Column("serialNumber", "Serial Number"), grid.Column("eventId", "Event ID"), grid.Column("", "Edit"))) </div> If someone could perhaps point me in the right direction as to where I am going wrong that would be great. Thanks. Kevin
  • Create New...