|
Hi in sql, "identity column" will automatically increase the value of its own, wenever other columns getting the value.
But in my case i have mentioned my column datatype as varchar, so "identity" wont work out here.
i want to insert my datas like this format for my ID Column,
ID
V00000001
V00000002
V00000003
.
.
.
V00000023
how to achieve using asp.net
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
If the data always begins with "V" I would use the idendity column and concatenate either in a calculated column or in my data/business layer to form the field.
Otherwise, add an insert trigger to the table and use string functions to convert to a number, find the next in the sequence, then insert the column.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Before inserting, get the max Id number from your database, increment it by 1 (or your wish) and then insert a new record in the table using an incremented Id.
You gona have to do some logic for the correct number of zeros to be put before the actuall number.
|
|
|
|
|
For that, you have to do the following.....
1) First retrieve the max id from your database.
2) Then convert the number part of data i.e. 00000001 to int.
3) Then increment it.
4) According to the number, concatenate that number of 0's and V to the incremented number.
5) Insert this id to your database.
6) Enjoy!

|
|
|
|
|
I am using visial studio 2010.
And i want to make download link.
so i made by using href tag.
for example) temp
for example) temp
xls show me download windows, but jpg file was opened by browser.
How can i download link about all files?
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Use an anchor tag, like this:
<a href="http://mysite/myfile.xls">My Excel File</a>
|
|
|
|
|
|
سلام
من میخوام تو سایت خودم محدودیت تعداد لاگین برای کاربران ایجاد کنم
اگه میشه منو راهنمایی می کنید
ممنون از لطفتون
|
|
|
|
|
Sorry, this site is English only.
|
|
|
|
|
Hi,
I'am searching for a script / code that can call (with a headset) between users of the script..
Can someone help me?
Greetz,
Rubert..
|
|
|
|
|
You need to clarify a bit more.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I need a script that make it possible to communicate between members, like skype. But then online.
Sorry, my English is not so good. 
|
|
|
|
|
Please kindly help.
I want to validate textbox only if checkbox is unchecked, if checkbox is checked no need to validate textbox as require field.
At where and when I have to attach and deattach RequireFieldValidator to textbox?
Thanks and best regards.
|
|
|
|
|
The ASAP.NET field validaators are run with JavaScript on the client first, then on the server if you have a Server meethod defined. Use some JavaScript to test when you click your submit button, or whatever method you are using to submit the form.
function ValidatePage()
{
return Page_Validate("VALIDATION GROUP NAME");
}
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Thanks Mark Nischalke and Shameel
I added a CustomValidator to the textbox and add ClientValidationFunction
This is my solution to share with other people those who have problem as mine
<asp:CustomValidator ID="CustomValidator1" runat="server"
ClientValidationFunction="CheckPorts" ControlToValidate="txtPort"
ErrorMessage="Please checked at checkbox or enter Port code in textbox." ValidateEmptyText="True"
ValidationGroup="RegisterAgentUser">*</asp:CustomValidator>
ValidateEmptyText="True" also important here, if not control will not doing validation.
function CheckPorts(sender, args) {
var chk = document.getElementById('<%= CType(CreateUserWizardStep1.ContentTemplateContainer.FindControl("chkViewAll"), CheckBox).ClientID %>')
if (args.Value == "" && chk.checked == false) {
args.IsValid = false;
}
else {
args.IsValid = true;
}
}
|
|
|
|
|
Currently I have a page with a button on it. When the button is clicked a query string is passed to generic handler. The purpose of this handler is to generate letters for individual students that were in a class (the query string is the class id). As the files are generated they are added to a zip file so the user only has to download one file. Everything works perfectly fine including the downloading of the file.
However my problem is I need a way to know when the handler has finished and to retrieve data from it. Specifically, as the handler is looping through all the students it may find that some students do not have all the necessary data saved in the database in order to generate the appropriate letter. In this case the students name is save in a List(Of String) so that it can inform the user, but continues creating the rest of the letters.
I have tried using HttpContext.Current.Items.Add("BlankStudents", BlankStudentRecords) and HttpContext.Current.Session("BlankStudents") = BlankStudentRecords in order to save the list. The latter did not work because it says the object is not set to an instance and I'm assuming it is referring to the session. The former did work, however the ASP page that calls the handler does not post back so it can't try and read from the HttpContext.
I tried using a redirect but I get a "Cannot redirect after HTTP headers have been sent" because this redirect is being done after the zip file is transmitted to the client. What would be the best way to accomplish this? Would it be better to add the zip file and the List(Of String) both to the HttpContext.Current.Items and then redirect back to the page and initiate the download from there, or is there an even better and efficient method.
Thanks in advance for any help or suggestions.
|
|
|
|
|
As per my knowledge and understanding, if you want to read/write session state value in HttpHandler then you have to implement
IRequiresSessionState . If I am wrong then please let me know.
public class Handler : IHttpHandler,IRequiresSessionState
{
...
Thanks
Parwej Ahamad
ahamad.parwej@gmail.com
|
|
|
|
|
hi
i want create multi language website with asp.net
please guide me
thanks
|
|
|
|
|
Just translate everything to all the languages you want to represent.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
|
Hi ,
I want implement pleas wait massage when i click button on user control ascx page in ASP.net.
How can i do it .please help me.
|
|
|
|
|
This is the basics
<div id="progress" style="visibility:hidden">Please wait...</div>
<input type="button" onclick="showProgress()"/>
function showProgress()
{
$("#progress").show();
}
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
I create web site.
But url has many parameters for example http://test.aspx?pageNumber=123&headerId=123123.
So when user click some button(it will go to http://test.aspx?pageNumber=123&headerId=123123.)
I want user to only show http://test.aspx in the url bar.
So, there is many url rewriting.
But i want to simple way.
We have windows2003 server.
If you know site which explain simeple way.
Let me know.
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|