I have a website that shows galleries, users can upload their own content from the web (by entering a URL) or by uploading a picture from their computer.
I am storing the URL in the database which works fine for the first case but I need to figure out where to store the actual images if a user uploads pictures from their local computer.
Is there any recommendation here or best practice on where should I store these and how can i store it on server?
help me! thank you very much
...I want to load a dropdown list in my web forms based on certain conditions, first here is my Table_columns(With types)
id--Int
food_type --varchar
First_start_time -- time
First_end_time -- time
second_start_time -- time
second_end_time -- time
Now I want to load values in which Current_Time > First_start_time
How to do this, it's basic question but I am not able to do it, so please let me know, thanks
...Hi, I have added login with facebook button using OAuth in my MVC project, now I want to get list of all the pages,while user is logging in, of which user is admin, here is the link which shows method to get list of pages that a user is admin of
But I would like to know to get the pages while logging in using ASP.NET MVC C#
Thanks.
...I have an action where I am putting zip files and those zipped files are unzipped. Now, the problem is, when I am unzipping those files....those files are saved into the App_Data folder in a weird format. Note that, I am saving the directory path as the string in my database table(img1).
...
Can we use email/string as a primary key in database table? and can pass in method of Asp.Net.
...
I have started coding in ASP.NET Core, so I am not sure what is the proper way to change port number of website? Is it using appsettings.Json file or we need to update startup.cs? Thanks.
...We are creating a big project/ERP in our software firm where we are using area concept for different modules. Problem is when we are publishing the project, there are only 5 project related DLLs like **.core.dll, *.utlility.DLL etc. What I am wanting is, to create DLLs for each area like HRMS.dll, Payroll.DLL, inventory.DLL etc. Is there any process?
...Hi, I am getting an exeption
An exception of type 'System.ArgumentNullException' occurred in System.Data.dll was not handled in user code Additional information: The 'dataType' argument can not be null.
When executing the below code
[HttpPost]
public JsonResult Chart()
{
string constr = ConfigurationManager.ConnectionStrings["ConnString"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("select text,date from T"))
{
cmd.Connection = con;
con.Open();
SqlDataReader sdr = cmd.ExecuteReader();
sdr.Read();
//Create a new DataTable.
DataTable dt = new DataTable("T");
List<object> iData = new List<object>();
//Load DataReader into the DataTable.
// dt.Load(sdr);
dt.Columns.Add(sdr["text"].ToString(), System.Type.GetType("System.String"));
dt.Columns.Add(sdr["date"].ToString(), System.Type.GetType("System.Datetime"));
foreach (DataColumn dc in dt.Columns)
{
List<object> x = new List<object>();
x = (from DataRow drr in dt.Rows select drr[dc.ColumnName]).ToList();
iData.Add(x);
}
//Source data returned as JSON
return Json(iData, JsonRequestBehavior.AllowGet);
}
}
}
Here is the image of the error
...
Hi. I'm using graph api to get posts and comments from facebook page. But I want get the new posts or new comments. Means want to refresh the data coming from graph api.
Is there any way to do that in ASP.NET MVC? Thanks.
...It might be an old question. I have recently created a website where the Navbar menus are dynamically generated by category. Inside those categories, different posts are created from the backend. Now the problem is when I change the name of the category, it is obvious that the <li> name in the website will also be updated. But it is not happening. Funny part is, it is changing in the database. I already checked that. When I am stopping my project and re-running it again, then it is working. Can anyone help me out with the problem?
N:B- I am taking my category name data through a global viewbag filter.
This is the code.
...