Click here to Skip to main content
14,663,843 members

Comments by Mostafa Asaduzzaman (Top 54 by date)

Mostafa Asaduzzaman 14-Sep-15 7:02am View
   
on top of route configuration you need to write the rules for getting the custom url
Mostafa Asaduzzaman 23-Jul-15 2:05am View
   
You are inheriting ApiController, why do you need the view then?
Mostafa Asaduzzaman 21-Jul-15 17:40pm View
   
Nice to hear that.

Best regards,
Mostafa
Mostafa Asaduzzaman 12-Jul-15 16:54pm View
   
This is one-way conversion from VS 2010 to VS 2012, you cannot revert back to VS 2010
Mostafa Asaduzzaman 11-Jul-15 1:31am View
   
Why these are with virtual keyword?
public virtual int AbilityID { get; set; }
public virtual string Title { get; set; }

are they not primitive data type?
Mostafa Asaduzzaman 10-Jul-15 17:37pm View
   
Please refer to this post: http://stackoverflow.com/questions/19949709/use-of-authconfig-bundleconfig-filterconfig-routeconfig-and-webapiconfig-in
Mostafa Asaduzzaman 5-Jul-15 8:07am View
   
Use EF to migrate the database
Mostafa Asaduzzaman 4-Jul-15 19:48pm View
   
Remove the column when you submit the form. If your are using the Scaffolding template then use Include Attribute to add necessary fields. Make sure that the in the database null values are allowed for 'Discriminator' column.
Mostafa Asaduzzaman 20-Jun-15 20:13pm View
   
there is a mixup between your two models News and tbl_market_news, the error message clearly states that. Make sure that your controller actions sends the information to the view and the view renders the actual information that it receives.
Mostafa Asaduzzaman 19-Jun-15 20:34pm View
   
rewrite this line : private IEnumerable OrderDetail;
to private IEnumerable<orderdetails> _orderDetails = new IEnumerable<orderdetails>()
and then
public virtual IEnumerable OrderDetails
{
get {return _orderDetails ; }
set {_orderDetails = value; }
}
Mostafa Asaduzzaman 18-Jun-15 16:28pm View
   
It sounds like you need to use Facebook Graph API and integrate it to your MVC application where ASP.NET Identity will help you for OWIN authentication.
http://www.pluralsight.com/courses/integrating-aspdotnet-mvc-facebook-graphapi this is a fantastic course on PluralSight, but it is not free.
Mostafa Asaduzzaman 17-Jun-15 18:24pm View
   
you can overwrite protected override void OnModelCreating(DbModelBuilder modelBuilder) in your DbContext class and then update table mapping there.
Have a look at: http://stackoverflow.com/questions/22855428/how-to-change-table-names-for-asp-net-identity-2-0-with-int-id-columns
Mostafa Asaduzzaman 12-Jun-15 2:26am View
   
you can use a modal dialog for this purpose, take to modal inputs and send them to the backend
Mostafa Asaduzzaman 12-Jun-15 1:20am View
   
you can construct the connection string within your code and then connect to the database
Mostafa Asaduzzaman 11-Jun-15 21:09pm View
   
Are you using Entity Framework?
Mostafa Asaduzzaman 10-Jun-15 17:42pm View
   
read the field value within a javascript function and with the button click execute the function to post the field value to the controller.
Mostafa Asaduzzaman 9-Jun-15 18:57pm View
   
you can have different functionalities by overloading the action. For example, Index can be Index(), Index(int id), Index(int id, Doctor doctor) etc.
Mostafa Asaduzzaman 9-Jun-15 18:29pm View
   
thanks for that
Mostafa Asaduzzaman 9-Jun-15 17:37pm View
   
Is it a simple table or gridview?
Mostafa Asaduzzaman 9-Jun-15 5:54am View
   
you need run some commands to create the tables and migrate them to the database. You can automate powershell scripts within your code so that when ever the admin will click the button it will run the scripts and create the database tables
Mostafa Asaduzzaman 8-Jun-15 21:34pm View
   
Deleted
I think your query is not correct, do you mean as this
select class as cls, SGroup as grp
from TblResult
where StId=100

If it is the equivalent LINQ can be:
var result = db.TblResult
Where(s=>s.StId==100).
Mostafa Asaduzzaman 8-Jun-15 17:52pm View
   
Why don't you use modal instead of MVC view? Modal with jquery will allow you to pass data back and forth
Mostafa Asaduzzaman 8-Jun-15 17:31pm View
   
you are welcome.
Mostafa Asaduzzaman 7-Jun-15 6:55am View
   
have you tried yet with Solution 1 ?
Mostafa Asaduzzaman 4-Jun-15 18:32pm View
   
try the suggestion from: http://stackoverflow.com/questions/20451461/save-detached-entity-in-entity-framework-6
Mostafa Asaduzzaman 4-Jun-15 6:34am View
   
You are most welcome. Let me know if need any thing more
Mostafa Asaduzzaman 4-Jun-15 5:50am View
   
not clear, do you want to add bootstrap which improves the quality of your page. You can add bootstrap to your existing template. are you using mvc?
Mostafa Asaduzzaman 3-Jun-15 6:04am View
   
you can try to use Custom Search from Google. Easy to integrate with the web site.
Please have a look at: https://www.google.com.au/cse/
Mostafa Asaduzzaman 3-Jun-15 5:29am View
   
Deleted
If you have pluralsight subscription, you can have lot of help from there.
Mostafa Asaduzzaman 3-Jun-15 0:40am View
   
is it the same question at:
http://stackoverflow.com/questions/30582328/use-js-to-display-dropdown-list-and-convert-name-and-city-values-to-uppercase-in
Mostafa Asaduzzaman 2-Jun-15 23:04pm View
   
In the current trends of MS Technologies, if you select MVC with TypeScript/Angular/jQuery would be the best choice.
Mostafa Asaduzzaman 2-Jun-15 22:16pm View
   
@Rocky
Have you tried with the trick yet?
Mostafa Asaduzzaman 2-Jun-15 17:35pm View
   
don't get as it is not in English
Mostafa Asaduzzaman 2-Jun-15 5:40am View
   
you can define the javascript function and through onclick event you can post to the controller action, thats way it will server the purpose that you want
Mostafa Asaduzzaman 2-Jun-15 0:46am View
   
why don't you create an array to store the values. A typed variable cannot store multiple values. Each time you click button save to the array and index it. thats easy.
Mostafa Asaduzzaman 2-Jun-15 0:25am View
   
what is the error message you are getting?
Mostafa Asaduzzaman 2-Jun-15 0:15am View
   
have you done database migration before running the application?
make sure that you have added the line
public DbSet< Client > Clients { get; set; } to your ApplicationDbContext class
Mostafa Asaduzzaman 1-Jun-15 20:24pm View
   
"this is the error that comes up on the browser" what is the error you haven't mentioned it.
--MA
Mostafa Asaduzzaman 1-Jun-15 20:23pm View
   
Deleted
"this is the error that comes up on the browser" what is is, you haven't mentioned
Mostafa Asaduzzaman 1-Jun-15 18:14pm View
   
can you share the code please
Mostafa Asaduzzaman 1-Jun-15 17:11pm View
   
I can see from your code (in WykonajPrzelew)
ViewBag.DaneKont = items;

SelectList selectList = new SelectList(items, "Value", "Text");
ViewBag.DaneKontList = selectList;
you calling in @Html.DropDownList("Przelew.DaneKont", ViewBag.DaneKontList as SelectList, "-- Wybierz kontot --")

try with @Html.DropDownList(ViewBag.DaneKont, ViewBag.DaneKontList as SelectList, "-- Wybierz kontot --")
Mostafa Asaduzzaman 1-Jun-15 1:53am View
   
Thank you and best of luck
Mostafa Asaduzzaman 31-May-15 17:48pm View
   
please have a look at: http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/sorting-filtering-and-paging-with-the-entity-framework-in-an-asp-net-mvc-application for searching within MVC framework.
If you would implement search engine for whole web site, try custom google search engine
Mostafa Asaduzzaman 31-May-15 16:27pm View
   
You have three classes and you would like to make a viewmodel of these 3 classes - its easy.
In the viewmodel define the properties that you need to filter the properties from the three class and you can add extra properties for your purpose such as linking to the classes.
Example might be as:
public class ItemCategoryViewModel
{
public item Item { get; set; } //Item class - your definition
public category Category { get; set; } //Category class - your definition
public subcategory Subcategory { get; set; } //SubCategory class - your definition
//add new properties here



public class ItemCategory
{
public string CategoryName { get; set; }
public string SubCategoryName { get; set; }
public string ItemName { get; set; }
//other properties if you need
}
public List<itemcategory> ItemCategories { get; set; } //Enumerable definition




}

after defining this, you can use the viewmodel in your controller methods and views for working with the data.
When you call the viewmodel, instanciate it first.For example
var itemcategoy = new ItemCategoryViewModel.ItemCategory
and then
itemcategoy.CategoryName = [get the categoryname from the database from your category table];
itemcategoy.SubCategoyName = [get the subcategoryname from the database from your sum category table];
itemcategoy.ItemName =[get the ItemName from the database from your Item table];

after that add the information to the list to display
vm.ItemCategories.Add(itemcategoy);

this will give you the Enumerable list of records for your view.

Then in the view you can loop through and display.

@foreach(var item in Model.ItemCategories)
{
<tr>
<td>@item.CategoryName
</td>
<td>
@item.SubCategoryName
</td>

< td >
@item.ItemName
</td>
</tr>
}

Note: Don't forget to include @model <yournamespace>.ItemCategoryViewModel at the top of your view
Mostafa Asaduzzaman 31-May-15 5:46am View
   
are you using mvc or asp.net web forms?
If you use mvc, then models and viewmodels can be used for communicating between views and controller
if you need some sample let me know
Mostafa Asaduzzaman 29-May-15 23:41pm View
   
Deleted
As Here-is-my-title is not action, you can then return to the controller method and pass the title as parameter as below:
Link Name

Hope this will help
Mostafa Asaduzzaman 27-May-15 21:46pm View
   
I am calling OpenFile function as
onclick="OpenFile('Convert.ToBase64String(@m.FileBytes)', '@m.FileName');"
Mostafa Asaduzzaman 27-May-15 21:32pm View
   
Google chrome: getting this error
Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.OpenFile
Mostafa Asaduzzaman 25-May-15 6:27am View
   
can you try ddlSex.SelectedValue.ToString()=="Female"
Mostafa Asaduzzaman 24-May-15 6:02am View
   
why not you calculate months from the days?
Mostafa Asaduzzaman 24-May-15 3:59am View
   
you can create a basecontroller and inherit all your controllers from that base controller
Mostafa Asaduzzaman 23-May-15 7:04am View
   
@OriginalGriff Thanks for your quick reply, it worked for me
Mostafa Asaduzzaman 21-May-15 21:02pm View
   
try to create a base class and write the code there to store the id as soon as the user logs in
Mostafa Asaduzzaman 7-May-15 0:43am View
   
fantastic,
Appreciate your response @Suvabrata