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
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
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
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
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
Good One :)
Pratik Bhuva --------------- The night is darkest just before the dawn. And I promise you, the dawn is coming
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
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
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
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
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
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
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
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
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
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
You can use ajax update pannel for fast image loading.
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