Web Forms :: Sequence Generation Using C Sharp?
Nov 2, 2010How to generate a sequence like the follwoing
AAA
AAB
AAC
.
.
.
ZZZ
I want to store it in a database as a column.
How to generate a sequence like the follwoing
AAA
AAB
AAC
.
.
.
ZZZ
I want to store it in a database as a column.
In my ASP.Net application, I am using ajax accordian control on my aspx page and vb.net for code behind pages.
I have used validation summary for page validation.
1st accordian Pane contains following fields:
First Name
Last Name etc.
2nd accordian Pane contain following fields:
Address
City
Country etc.
while validating the page It displays error messages in following sequence:
Address cannot be blank
City cannot be blank
Country.....
First Name....
Last Name....
But I want to display error messages in following order:
First Name cannot be blank
Last Name....
Address cannot be blank
City cannot be blank
Country.....
I tried to resolve it by giving tabIndex to textboxes and RequiredFieldValidator, but sequence doesn't change I created RequiredFieldValidator again in sequence, but it doesn't affect.
how can we create Passing Arrays to Methods inc sharp
View 4 RepliesWhen I am building my typing tutor application the errors user made I want to show it in RED into his textbox. I created a LIST to have the index values stored but cannot figure it out how to retieve it and make them display as RED COLOR in UserTexbox.
[Code]....
I have a modal popup where the 1st control is a dropdownlist, then 2 invisible textboxes and then one visible text box(txt1). All of these have required field validators attached with ajax callout extender.
Based on the dropdown value, the invisible textboxes get visible and the corresponding required field validator controls get enabled.
Now problem is, if i dont enter anything and click on submit, instead of showing error message for the 1st control i.e. the drop down, it is showing message for the visible textbox(txt1).
what i am supposed to do, to display the error messages accordiing to the tab index of the controls?
I've got a piece of code that should generate a menu with subitems from a datasource. The menu is displaying without errors but de submenu items are presented as menuitems. Can't figure out whats wrong:
Dim sqlMenuRdr As SqlDataReader = objDbMenu.GetDbMenuItems.ExecuteReader
Dim sqlSubMenuRdr As SqlDataReader = Nothing
Dim i As Integer = 0
[code]...
which is the better language in terms of coding, proficieny if we compare between VB.Net and C Sharp.
View 7 RepliesWhat does the underscore mean in C Sharp?
I saw a program,
Csharp Code:
Class Metals {string _metalType;public Metals(string type){_metalType = type;Console.WriteLine("Metal: " + _metalType);}}
What does the _ (underscore) mean in it?
Does that mean any static variable or something else?
I want to display Validation Summary message in Sequence how to mannage this
The Summary message not shown in Sequence
1.First Name Is Required
2.Last NAme Is required
I am having a requirement where I am using Ajax Tab, I am having 3 tabs. If user select second or 3 rd tab I would like throw an alert saying do you wish to move if yes I would like to move to next tab if not I would like to stay in the current tab...
My sample script is as follows
<script type="text/Javascript>
function checkSave() {
sSave = window.confirm("You have some changes that have not been saved. Click OK to save now or CANCEL to continue without saving.");
if (sSave == true) {
var tabIndex = $find("TabContainer1"); //AdvOrBasicSearch is name of tabContainer
[Code] ....
I a method that generates a PDF and the method returns a byte value, but after response.end statement, the shows an error that the "File does not begin with '%PDF-' here is the code:
[Code]....
[Code]....
I'm writing out lots of checkbox controls dynamically based on a query result. In a subsequent sub, I need to check some of those boxes based on another query.
So, in my first sub I have this in my reader loop:
[Code]....
In my second sub, I get the IDs for those boxes that need to be checked.
How do I reference the dynamically generated checkboxes from here? Something like:
divGrid.Controls.? .checked = true
I am unable to show message using msgbox.show method in c sharp which we can use in Vb.net.
How to implement such thing in c sharp
I'm where am i going wrong with my hyperlink?
[Code]....
i get a compilation error, Unrecognized escape sequence.
Is there a more general descripton of the sequence of events for a page loading
[Code]....
can anyone tell me how to solve this issue Assembly generation failed -- Referenced assembly 'Microsoft.Web.UI.WebControls' does not have a strong name
View 1 RepliesI am trying to add some code that logs to a table the time a page has taken to generate, from the request coming in to the response given back. The easiest way to do this is through our master page as it can add the timings of every page.Where I'm a little unsure, is when to put the start and end timings.Currently, I set the start time in the page.unload and the end time as the last part of the page.load on the master page.The figures coming back seem ok, but I'm not sure if I am picking the earliest and latest possible times to get my timings?
View 2 RepliesHow to Create a function for Prefix generation on each insert row ?I have a table with ID as primary and is identity and increment by 1. and POID another column.Now I need to generate a function like this.In POID Column on each insert I need to set prefix like this
PI000001
PI000002
PI000003
PI000004
PI000005
PI000006
PI000007
PI000008
PI000010
PI000011
and so on ......like this and so on ....
What is partial class in c sharp and whats the use of it, how to implement the partial class
View 6 RepliesMy project is completely built on asp.net with codebehind vb.net, is it possible to add a class library .cs file to my project. since it is based on c sharp will i be able to add it.
View 2 RepliesI am new to asp.net c sharp; right now I am working on one project, in that I need to send the [short message service] to mobiles, I don't how to send the message to mobile. Please someone help me, give some ideas or some links where I can find the sample code or sample projects
View 6 Repliesgive me any pointers for free tutorial on RADGRID or give me a simple example on how to create a RADGRID and bind it to data source.
View 2 RepliesI want to select data from SqlDataSource tag to gridview using TextBox1 value.how can i modify that ASP.net code behind file..
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
SelectCommand= "select distinct [Species],[qty],[received],[Discard],[mortility],[dispatch],[dispatch],[dpt_sales] from [vw_getFishDtls] where [Tank_id]=TextBox1.Text and [ftype] =(select [ftype] from [vw_getFishType] where [Tank_id]=TextBox1.Text"
ConnectionString="Data Source=IT-ISHAN;Initial Catalog=ETF;User Id=ishanuk77; Password=ishanuk77;">
</asp:SqlDataSource>
i am writing a simple C# application with sql as my database however i am confused how to connect to my database the details are the following:
Server = "BFO-PC3\BFOPC3SQL2000";
Username = "aesadmin";
Password = "adminpw";
Database = "M4200";
i have extracted data from database..currently that information is in a string variable...my point is to pass that string value into a gridview in the application..i have already created the gridview with checkbox list fitted into it...on inserting the values will the gridview will expand dynamically ??..if no then what to do ? how to push the data into gridview so that it expands dynamically?
View 1 Replies