|
Replace you RegularExpression Validator with a Custom Validator, then you can use string.match js method to validate you textbox.
here is a link on how to use the string.match() method:
string.match()
|
|
|
|
|
Hi,
you can use dropdown selected index changed event on dropdownlist.
means if your regular expression validator id is regular1 then just false its visibility from server side as reqular1.Visible=false;
try it.
this can also done by Jquery.
|
|
|
|
|
|
i am having the problem with insert / update nvarchar model data in Entity Framework ( Asp.net 4.0 - MVC 4 )
In SQL Server 2008, i have "PhoneNo" [nvarchar(60)] column in UserInfo table.
Via Entity framework i can able to update from 1 to 30 characters only (which means 50% in that datatype. if length is 100, i can able to save from 1 to 50). Suppose if i give more than 30 chars then throws exception.
{"String or binary data would be truncated.\r\nThe statement has been terminated."}
Note: Using sql server query i can able to save upto 60 chars. but entity framework i can't.
Please provide me the solution for this issue.
Thanks in advance.
With Regards
Ganesan.M
|
|
|
|
|
Hey all
Hope someone could help with some advice i am considering building a site where users can read reviews on different products. Also i would like to create a mobile platform to allow users, on the go, to read reviews.
But i am a bit lost in relation to how the system should be build, either i should build from scratch this would give me complete control but also in my view be very time consuming, or should i use Umbraco as base of for my site?
If i choose umbraco should i create my own tables for product storage or use umbraco's document type, here i am thinking about how to later extract data using a web service.
any input would be appreciated
|
|
|
|
|
Edit GridView Row not working when new row is inserted on GridView RowCreated
Requirement:
Display data in a GridView Control
1. Group by particular column called "Region"
2. Also display total sum of revenue for each region
3. Column called "Remarks" should be editable
Problem:
I am unable to edit the Column
(since i have inserted rows which displays sum for each region)
The Row Edit index gets updated due to which i am facing this problem
Solutions Tried:
Created a template field with a button in it (Still not able to Edit)
Request the members to help me on this.
|
|
|
|
|
Dear all,
I am currently beginner into this web api applications. I require a little help in how do I go about retrieving previous day's data using entity framework from 'GET' method.
I have constructed the following the code but I cannot get seem to get it work:
The following code is in the WIC controller class.
public database_WICs Getdatabase_WICs(DateTime UploadDate)
{
database_WICs database_wics = db.database_WICs.Find(UploadDate);
string yesterday = DateTime.Today.AddDays(-1).ToShortDateString();
if (database_wics == null)
{
throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound));
}
return database_wics;
}
Any help would be very much appreciated.
Thank you
|
|
|
|
|
Quote:
string yesterday = DateTime.Today.AddDays(-1).ToShortDateString();
What this line for?
You mean to do this before and pass yesterday to the db?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Thank you for your reply.
I changed the above line to the following below:
string yesterday = db.database_BWICs.Find(d => d.UploadDate == yesterday);
Whenever I add
db.database_WICs.Find(d => d.UploadDate == yesterday
I get the following error in the code:
"Cannot convert lambda expression to type 'object[]' because it is not a delegate type."
I can not seem to figure out why.
Any help would be very much appreciated.
Thank you
|
|
|
|
|
To check it I need the signature of db.database_WICs.Find method...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Hello, thank you for your response.
I apologies for the late response, by signature you mean the entire api control class or the database model code.
Thanks
|
|
|
|
|
By signature I mean the types of its parameters and return value.
See here http://en.wikipedia.org/wiki/Type_signature[^]
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Thank you so much for your response. Here is the data model with all its parameters:
namespace Wic_T1
{
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
[DataContract]
public partial class database_WICs
{
[DataMember]
public int ID { get; set; }
[DataMember]
public string Name { get; set; }
public Nullable<System.DateTime> SaleDateTime { get; set; }
public string Region { get; set; }
[DataMember]
public string CUSIP { get; set; }
[DataMember]
public string Size__m_ { get; set; }
public string OriginalRating { get; set; }
public Nullable<System.DateTime> MaturityDate { get; set; }
public string Manager { get; set; }
[DataMember]
public string priceTalk { get; set; }
[DataMember]
public string Cover { get; set; }
public Nullable<System.DateTime> LastUpdated { get; set; }
[DataMember]
public Nullable<System.DateTime> UploadDate { get; set; }
[DataMember]
public string Type { get; set; }
[DataMember]
public string ISINs { get; set; }
[DataMember]
public Nullable<float> Decimal_price { get; set; }
public string CMBS_spread { get; set; }
public Nullable<float> CMBS_decimal { get; set; }
[DataMember]
public string Current_size { get; set; }
}
}
I really appreciate your time and help.
|
|
|
|
|
It seems that, that was not enough.
Do we talk about a big project? Or can you zip it all and send me to peter@rashim.co.il?
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Apology for the late response.
I partially go the code to work. as it now display's yesterday's data feed.
However, I have weekday dates data stored on server and when I call data from now.date Monday, I get a null list on the client-side.
Is their any example, where I can use to get yesterday's date data excluding weekend dates?
<pre lang="c#">public IEnumerable<database_BWICs> GetDate()
{
DateTime yesterday = DateTime.Today.AddDays(-1);
var data = from c in db.database_BWICs
where c.UploadDate == yesterday
select c;
return data.ToList();
}
Thank you so much for your support and generous gesture.
I really appreciate your time and help.
|
|
|
|
|
|
On to an issue whether or not we should move to MVC development I have been debating this with my developers now for months.
And some insist MVC is better though I just dont see it.
What makes a programming methodology better for me ?
Speed of development.
Developer spending less time on interface and normal features and more time getting validation and business logic to be solid
Code that is easy to understand by new developers taking on the project
Structure that is easy to follow and you dont have to jump between mappings and target pages to check how they link
Ability to create reusable controls
Visual designer , so you dont have to repeatedly code something as mundane as a table.
Scalability
When working with MVC4
Razor
Visual designer Gone ;(
No Server Controls
Hooking up an event is manually coded (instead of double clicking or hooking up an event
Single controller multiple pages
Bottom line is what is quicker , on asp.net I can drag a button on the exact spot i need it double click (3 seconds later) I have a button named and hooked up to an event without touching the keyboard. which the mvc guy is still busy typing his input tag , not to mention switching between the controller and the markup screens creating a event and a model.
When i used a aspx grid , I get a nice linq data source hook it up to a grid, columns gets auto generated , meaning all i have to do is change the column headers , click that I want to enable sorting and paging , and I am done 2 minutes later. and if I have not too complex columns the add edit and delete features are created for me in one shot which can be configured for more complex scenarios's
Now as an mvc developer doing the whole grid thing , everything has to be coded , I have to code my data queries (be it LINQ or SQL) to do the paging and sorting , 2 hours an insane amount of typing and script later I have something that kinda does the same thing but looks butt ugly. I guess an expereinced MVC dev can do it in probably 10 mintes flat
My Recommendation, MVC is ok for cases with little complexity and smaller size projects, but when you need to deliver something of great scale and complexity you are shooting yourself in the foot as you will still be coding interface logic when a asp.net dev is long done with the project.
Also just in case you wondering I know
1 MVC does not have viewstate : good practiice minimises viewstate/ you can also hide your viewstate in session using very basic code, also viewstate has never kept me awake one night , projects running late has
2. MVC generates easy to read markup : not really relevant since your customers only really look at the interface not the code
("but but but. . . search engines" - trust me google can handle it.
3. Ability to create clean user friendly urls - The url rewrite method has been available since .net 2, and is infinitely flexible to anyone who knows their regular expressions
The goal of industry here is.
1.to have it done quickly
2.have it done at low cost
3.and to have to have it done right
(you can have only 2 of the 3)
now needless to say 3 quality is non negotiable and 2 is usually what sells software to a client .
but 1 does not help you if developers pulling a salary takes 3 months to develop software that brings in 1 month of profit
So please explain why MVC is better ?
Chona1171
Web Developer (C#), Silverlight
|
|
|
|
|
It isn't.
The Microsoft implementation of MVC is far (even version 4) from being satisfactory to me too.
I'm working on a large enterprise app and before each major version we check what new tools/environments we should use/incorporate.
MVC (not the architecture) failed with large noise...
I worked with COBOL with the idea of separated layers, but never imagined that 20 years later it will means no code-reuse...
I found MVC good only for very small size apps...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Look there are things i like about it , but give it about 2-3 more releases before they have something a bit more commercially viable
Chona1171
Web Developer (C#), Silverlight
|
|
|
|
|
2-3 more? after MVC5 of before?
It makes if 7-8 releases!!!
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
Never read so much nonsense about MVC framework as I read here.
Do you know Stack Overflow? It was written using MVC.
Visual Designer? Well, I don't get where it fits on webdesigner/webdevelopment.
If you don't know nothing about HTTP and the flow of request/response go with webforms and suffer, suffer a hell in mantainance.
You don't like patterns and practices? Go with webforms.
MVC is a robust and well known architectural way to build webapps. It shares it concept from the Ruby On Rails.
MVC allows low cost mantainance even if the start of the project costs a (little) bit more.
Webforms are good for RAD, and IMHO just for that.
If you want to build flexible, robust, low mantainance cost webapps despite the complexity of then you will for sure choose MVC.
|
|
|
|
|
MVC is robust, and well known.
The Microsoft implementation isn't - not even close!!!
(I tell you a secret - I wrote according MVC 25 years ago in COBOL. No web then!)
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
I have a RadGrid using a standard grid hierarchy and am trying to open a RadWindow from within the OnItemCommand event when a radbutton column item is selected. When I select the button the code below does run (checked using a break point); however, the radwindow does not open and the radgrid itself appears to do a partial postback. Any Ideas why the rad window does not display? The code is as follows:
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "ButtonEdit")
{
//opening window
RadWindow newWindow = new RadWindow();
newWindow.ID = "RadWindow1";
newWindow.NavigateUrl = "Window1.aspx";
newWindow.VisibleOnPageLoad = true;
RadWindowManager1.Windows.Add(newWindow);
}
}
Also note, the RadWindowManager is valid as it is used elsewhere on the page with no problems.
Thanks,
Steve Holdorf
|
|
|
|
|
Hi,
You wrote that RadGrid seem to do a partial post-back. You may check it by looking to IsPostBack property...
If this is true (and older RadGrid has it own ajax and used it to partial post back independently from your declarations) than setting VisibleOnPageLoad will not work (no pageload...). In that case you mast render some js to open the window...
May I suggest something?
Use client side js to open RadWindow...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).
|
|
|
|
|
how can i add different types of image slideshow in asp.net?
|
|
|
|