|
There is configurations. You mean properties?
Important(common) properties of validators are,
ControlToValidate , Display , ErrorMessage , EnableClientScript , IsValid , Text
Additional properties are,
CompareValidator - ControlToCompare, Operator, Type, ValueToCompare
CustomValidator - ClientValidationFunction, OnServerValidate
RangeValidator - MaximumValue, MinimumValue, Type
RegularExpressionValidator - ValidationExpression
RequiredFieldValidator -
ValidationSummary - DisplayMode, HeaderText, ShowMessageBox, ShowSummary
Read this
ASP.NET Validation Server Controls[^]
|
|
|
|
|
I'm using msaccess(2007) database and I get the error message above while tryig to execute the following code:
OleDbCommand cmd = new OleDbCommand();
cmd.CommandText = "INSERT INTO tblCategory(CategoryName, OrderNum) " +
"VALUES(@CategoryName, @OrderNum) " +
"SELECT @@IDENTITY AS ID";
cmd.Parameters.Add(new OleDbParameter("@CategoryName", Category.CategoryName));
cmd.Parameters.Add(new OleDbParameter("@OrderNum", Category.Order));
cmd.Connection = DataAccess.CreateConnection("Malasot", false);
DataTable dt = new DataTable();
OleDbDataAdapter adapter = new OleDbDataAdapter(cmd);
if(cmd.Connection.State != ConnectionState.Open)
cmd.Connection.Open();
adapter.Fill(dt);
note: I have tryed putting semicolon between the 2 statements and it doesn't solve the problem.
modified on Monday, June 20, 2011 2:38 PM
|
|
|
|
|
as your error stating, just place semi colon after the insert statement.
cmd.CommandText = "INSERT INTO tblCategory(CategoryName, OrderNum) " +
"VALUES(@CategoryName, @OrderNum); " +
"SELECT @@IDENTITY AS ID";
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
I've just tryed it, it didn't help
|
|
|
|
|
How about adding a semicolon after the second SQL statement:
cmd.CommandText =
"INSERT INTO tblCategory(CategoryName, OrderNum) " +
"VALUES(@CategoryName, @OrderNum); " +
"SELECT @@IDENTITY AS ID;";
|
|
|
|
|
Error is same OR giving different one? Can you try once to execute two separate statement on by one because I have double that Access generating instantly Identity value.
Thanks,
Parwej
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
I've tryed adding semicolon and the error message I get is: "Characters found after end of SQL statement."
I guess it will work well if I execute 2 seperated commands, but my goal is to execute all in one command, if it's possible.
|
|
|
|
|
Hi Benames,
I haven't try from side, but I had searched on Google and they clearly mentioned that we can not execute multiple statement in single query against Ms Access DB. So may be cause of the error. So if possible execute two separated statement to achieve your goal.
Thanks,
Parwej
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
Ok, probably you are right.
It goes well when I run it in 2 different commands.
|
|
|
|
|
guys;
i want to show an UpdateProgress when triggering an updatepanel to be updated. like this
<asp:button id="button1" runat="server" text="button1" />
<asp:upddatepanel id="upddatepanel1" runat="server">
<triggers>
<asp:asyncpostbacktrigger ControlID="button1" EventName="Click" />
</triggers>
</asp:upddatepanel>
<asp:UpdateProgress ID="ModalUpdateProgress1" DisplayAfter="0"
runat="server" AssociatedUpdatePanelID="upddatepanel1">
<ProgressTemplate>
Loading ...
</ProgressTemplate>
</asp:UpdateProgress>
what do you think?
Help people,so poeple can help you.
|
|
|
|
|
You don't want to use UpdateProgress control?
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
Sir;
The existing UpdateProgress shows its content on asynchrnous postbaks just in the case of the postback control was a child of the AssociatedUpdatePanel if any.
what i am trhinking of is inheriting from UpdateProgress adn add a new property of type List<string> named AssociatedUpdatePanelTriggers that holds triggers ids of the AssociatedUpdatePanel and push them to the javascript version of the class on method Render() though ClientScript.RegisterStartupScript()
what do you think?
Help people,so poeple can help you.
|
|
|
|
|
actually i worked with asp.net and now i will go throw MVC. i need example for MVC plz help me
thank u
j somasekhar
|
|
|
|
|
Here you will find lot of usefull tutorials and videos. Check "Learning Resources" section. At the top of that section, there are also links for additionnal content.
http://www.asp.net/mvc[^]
Philippe Mori
|
|
|
|
|
|
@Philippe Mori Good link.
|
|
|
|
|
When I deploy my web application and when two persons (administrator, Encoder) logged in at same time to my web application then the pages gets interchanges between the logged in users.
We have develop the software in ASP.net VS-2008 and SQL Server 2005.
|
|
|
|
|
Not nearly enough information to be able to help. e.g. does this happen on the dev box as well? Are there any exceptions reported? Is it your design? Also, not clear what you mean by 'pages get interchanges betwen th elogged in users'???
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
you are developing a web application rite. there is no problem how many users will be logged in. suppose with same user name u will login with different browsers rite there will be nothing happens. first ask the question clearly i am not getting ur question
j somasekhar
|
|
|
|
|
I'm going to guess that you are having a problem with security rights or something like that.
Are you using session variables (or global variables) to store data between pages or postbacks ? I bet you are mixing things up and that is why you are seeing strange behavior.
Just a total guess. You didn't give enough detail of your problem.
Give more detail like:
1) User A does ...
2) User B then, ....
3) User A sees ....
More detail will lead to a faster and more accurate response.
Good luck.
|
|
|
|
|
Hi,
Here is my guess of what could be causing your applications behaviour.
You are using Cache["Id"] e.g. to store user data!
If that's the case, the cache object sits on the servers hard disk and your cache data will be used when ever your application is invoked by IIS. As you may have noticed, the Cache["id"] is not unique which is why your application displays different data to each user depending on who request server data first.
Cach["key"] objects are different from Session["key"], google this one out!
SOLUTION:
Make all your Cache["key"] variables unique hence the name "key" to something like:
Cache["id" + id] = id;
Cache["username" + id] = username;
Cache["password" + id] = password;
to retrieve each cache, you might want to pass the "id" in a querystring from page to page.
Shout if you have any trouble. Also consider carefully when to use Cache, Cookies, or Session objects to store user data.
Morgs
|
|
|
|
|
I have a project that I need to allow the user to format text but with the constraint that the control limits the maximum height and width of the input text to a predetermined size. Eventually this HTML will be exported to RTF which will be input into another process, but I cannot pass more text than fits into this area size.
I have looked at various HTML editor controls for ASP.NET such as DevExpress' ASPxHtmlEditor or just plain javascript HTML editors such openWYSIWYG or TinyEditor but they do not look like they support limiting the input text to the available size. Each of these expand the size of the editing area and add scrollbars. I did play with prototypes that set the overflow style to hidden and it looks like it works, but the extra text is just hidden at the bottom. I thought about trying to get access to whether scroll bars are present after setting the wysiwyg textbox, but I can't figure out how to reliably tell whether they are present.
Does anyone know of how to accomplish this? Are there any controls that already have this functionality? The user base can be IE only.
Thanks for your help.
|
|
|
|
|
Hello,
Is there any HTML editor control for ASP? My client wants to include one in his ASP application
Cheers
|
|
|
|
|
|
you can use ajax editor control comes with the ajaxcontroltoolkit.
FckEditor can be the another choice.
Search google get the download link and download the same.
hope you get what you want
|
|
|
|