Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

Pratik Bhuva

@Pratik Bhuva
About
Posts
17
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Did you ever notice
    P Pratik Bhuva

    Yes, Always. And that voice is louder than my headphone's sound.

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    The Lounge com question announcement

  • Which type are you?
    P Pratik Bhuva

    I Don't and I hate wo do that.

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    The Lounge question mobile help

  • Are your CDs dying?
    P Pratik Bhuva

    Once before ages, people on earth were using CDs to store their data. True Story !!!

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    The Insider News com question

  • classic asp.net or MVC?
    P Pratik Bhuva

    Currently i am working on the project as you have described. We have developed that in MVC and Generic Repository. And this application is almost done except the changes and additional features. So as i have experienced that MVC is better for this kind of projects due to Maintenance and Constant changes and additional requirements.

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    The Lounge asp-net question csharp database architecture

  • Top Experts this month & 24 hours...
    P Pratik Bhuva

    Good One :)

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    Site Bugs / Suggestions database data-structures question

  • Return value of variable from Stored Procedure to BC layer
    P Pratik Bhuva

    This May Help You... http://lmgtfy.com/?q=ado.net+stored+procedure+example[^]

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    ASP.NET sharepoint database help

  • MVC4 Ajax call does not reach controller method
    P Pratik Bhuva

    Try...

    $.ajax({
    ...
    ...
    url: '@Url.Action("ActionName","ControllerName")',
    ...
    ...
    })

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    ASP.NET question html help

  • Uploading an Image
    P Pratik Bhuva

    Code To upload Your Image to folder

    YourFunctionToUploadImage()
    {
    //Check FileUpload controll has File Or not
    if (ImageFileUploadControll.HasFile)
    {
    string fileExtention = System.IO.Path.GetExtension(ImageFileUploadControll.FileName);
    //Check For Valid Extension
    if (fileExtention.ToLower() != ".jpg" && fileExtention.ToLower() != ".jpeg" && fileExtention.ToLower() != ".png")
    {
    lblUploadstatus.Text = "Invalid File Choose .jpg/.jpeg/.png/.gif";
    }
    else
    {
    //check if file already Exists in Folder
    if (File.Exists(Server.MapPath("~/Folder_Name/" + ImageFileUploadControll.FileName)))
    {
    lblUploadstatus.Text = "File Already Exists. Rename filename";
    }
    else
    {
    //To Save Image To your Specific Location.
    //srever.mappath takes us to Folder which containing our application
    ImageFileUploadControll.SaveAs(Server.MapPath("~/Folder_Name/" + ImageFileUploadControll.FileName));
    lblUploadstatus.Text = "Upload Status : File Uploaded Successfully";
    }
    }

    }
    else
    {
    lblUploadstatus.Text = "Please Select File";
    }
    }

    Code To Retrive All Images form Folder and display in image_control you can use

    PageLoadEvent()
    {
    //use DirectoryInfo to get all imageFile's Information
    DirectoryInfo dir = new DirectoryInfo(Server.MapPath("~/Folder_Name/"));
    FileInfo[] fi = dir.GetFiles();

       //Now you just need to create new image control each time and add ImageUrl to it
       foreach(FileInfo f in fi)
       {
            string imageUrl = f.ToString();
            Image img = new Image();
            img.ImageUrl = "~/Folder\_Name/"+"imageUrl";
       }
    

    }

    Hope This Help

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    ASP.NET help database question

  • how to upload a file into an application
    P Pratik Bhuva

    I have answered this before...just check this out. File Upload & saved in Sql Database[^] Hope this will helps you.

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    ASP.NET question csharp asp-net tutorial

  • my question comes slow
    P Pratik Bhuva

    Get All data at once in List and display question one by one. And if page is using heavy controls then use jquery/Ajax to update just Questions.this will not invoke postback and your execution time can be reduced. Hope this Help.

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    ASP.NET help csharp asp-net database sysadmin

  • It is proven
    P Pratik Bhuva

    It will be independence day for all programmers when Microsoft stops its service for IE. :((

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    The Lounge question com

  • Top Experts this month & 24 hours...
    P Pratik Bhuva

    I have gone through all that comments and found its Worth reading... Thanks for sharing this link. :thumbsup:

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    Site Bugs / Suggestions database data-structures question

  • Top Experts this month & 24 hours...
    P Pratik Bhuva

    Ok Got It !!! And sorry if i have done anything wrong by posting this.

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    Site Bugs / Suggestions database data-structures question

  • Top Experts this month & 24 hours...
    P Pratik Bhuva

    The list of Top Experts this month & 24 hours starts with 0(zero). shouldn't it starts with 1(one)??? Or is it there intentionally that our array index starts with 0 so...

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    Site Bugs / Suggestions database data-structures question

  • Google doodle for Bill Gates...
    P Pratik Bhuva

    Happy Birthday to Bill Gates. Should google show doodle for wishing birthday to Bill Gates???

    Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming

    The Lounge question

  • Display images from server folder
    P Pratik Bhuva

    You can use ajax update pannel for fast image loading.

    ASP.NET sysadmin help question

  • Display images from server folder
    P Pratik Bhuva

    Code To upload Your Image to folder

    YourFunctionToUploadImage()
    {
    //Check FileUpload controll has File Or not
    if (ImageFileUploadControll.HasFile)
    {
    string fileExtention = System.IO.Path.GetExtension(ImageFileUploadControll.FileName);
    //Check For Valid Extension
    if (fileExtention.ToLower() != ".jpg" && fileExtention.ToLower() != ".jpeg" && fileExtention.ToLower() != ".png")
    {
    lblUploadstatus.Text = "Invalid File Choose .jpg/.jpeg/.png/.gif";
    }
    else
    {
    //check if file already Exists in Folder
    if (File.Exists(Server.MapPath("~/Folder_Name/" + ImageFileUploadControll.FileName)))
    {
    lblUploadstatus.Text = "File Already Exists. Rename filename";
    }
    else
    {
    //To Save Image To your Specific Location.
    //srever.mappath takes us to Folder which containing our application
    ImageFileUploadControll.SaveAs(Server.MapPath("~/Folder_Name/" + ImageFileUploadControll.FileName));
    lblUploadstatus.Text = "Upload Status : File Uploaded Successfully";
    }
    }

    }
    else
    {
    lblUploadstatus.Text = "Please Select File";
    }
    }

    Code To Retrive Images form Folder

    PageLoadEvent()
    {
    //use DirectoryInfo to get all imageFile's Information
    DirectoryInfo dir = new DirectoryInfo(Server.MapPath("~/Folder_Name/"));
    FileInfo[] fi = dir.GetFiles();

       //Now you just need to create new image control each time and add ImageUrl to it
       foreach(FileInfo f in fi)
       {
            string imageUrl = f.ToString();
            Image img = new Image();
            img.ImageUrl = "~/Folder\_Name/"+"imageUrl";
       }
    

    }

    Hope This Help

    Pratik M. Bhuva

    ASP.NET sysadmin help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups