12,085 Topics

Member Avatar for
Member Avatar for anup.maverick

Hi, I want the vb.net code(asp.net 2.0) for validating multiple email address in a textbox(multiline). Life is the only God....OSHO Thanx - Anup

Member Avatar for bru moses
0
1K
Member Avatar for HunainHafeez

what's the difference between these two actually ? Requesting page for the first time (or hitting enter in address bar) gives Ispostback = fasle but when i refresh my page then it sets isPostback = true, why ? it should not do like this for refreshing ?

Member Avatar for JorgeM
0
166
Member Avatar for gahhon

How do i compare the months from database where my database records are stored in date format (12/12/2013) Ignoring the days. For example This Month `12/08/2013` Next Month `12/09/2013` if both are match, i will return my true else false? protected void renewCurrentBudget() { Boolean renew = true; DateTime nextMonth; …

Member Avatar for gahhon
0
321
Member Avatar for HunainHafeez

ok we know that .net app cannot be directly converted to machine code, first it si compiled to MSIl which is converted to machine specific code by JIT on request, once but what about asp.net app ? e.g. i decelop a web page and put it on my laptop (working …

Member Avatar for HunainHafeez
0
178
Member Avatar for HunainHafeez

can i host a website from my laptop ? like i have developed a lot of web sites and few are online on servers via free hosting sevice but if i want to serve it from a laptop, so it possible ? i mean making my laptop a live server …

Member Avatar for HunainHafeez
0
350
Member Avatar for grafic.web

Hi there, i am new with asp.net and i would like to start with it!!! I was wondering if anyone could suggest me any good and easy to understand tutorial where i can learn how to make a list from sql and edit the record in a new page (add, …

Member Avatar for grafic.web
0
306
Member Avatar for alpdoruk

Hello Experts, First I want to thank you all.I am getting all responses at this Daniweb :) My problem is that I have a sql statement where I want to add where clause in case of dropdown is changed. My database connection part: <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/_database.accdb" SelectCommand="SELECT * FROM …

Member Avatar for alpdoruk
0
852
Member Avatar for alpdoruk

Hello Experts, I have a dropdown list which is taking information from a database in which i used as per below SELECT DISTINCT * FROM [Devices] but still it shows multiple same values.I want that the values are unique.How should I fix it ? I already clicked -return only unique …

Member Avatar for alpdoruk
0
134
Member Avatar for amrita111

In asp.net I tried making an application in which I have a file upload option ...user can uplaod 500 files of image types in 1 go(select multiple image types files by using ctrl)....bt now when i have deployed this in IIS....its not working....displays a message page cannot be found....in web …

Member Avatar for JorgeM
0
189
Member Avatar for HunainHafeez

today a friend told me that Hunain, did you notice that OOP concepts like inhertance, polymorphism, interface etc aren't usuallt applied to ASP.net. so it made me confused and thought for a while, and yes he seems to be right ! i never used any of them adn even most …

Member Avatar for JorgeM
0
110
Member Avatar for gahhon
Member Avatar for alpdoruk

Hello Experts, First of all I don't know if i am on the right track.If I am not please suggest your best,easy options :) What I am trying to do is the following. I have a web page which is included with textboxes I have also a database inside there …

Member Avatar for alpdoruk
0
297
Member Avatar for gahhon

In the sql database definition i am able to set my primary key to int data type and auto increment that number (identity specification), thus the result will be in `1, 2, 3,....` but how can i add some string into it? example `C0001, C0002, C0003, etc` ?

Member Avatar for pritaeas
0
66
Member Avatar for gahhon

i have 3 text box which must be in numeric, but i just want shown only one error message once either one of the text box was incorrect formating. how can i archieve that?

Member Avatar for gahhon
0
234
Member Avatar for gahhon

As i doing research i know most of them are suggesting use `<body onbeforeunload="beforeUnload" onunload="unload">` But i trying to do some sample, is this can't work it. Could you guys provide a simplest example to me ? In fact, i gonna to delete the `Cookies` value whenever they are trying …

Member Avatar for gahhon
0
223
Member Avatar for vishal1984

Hi, I need a help . The issue is the , I need to display the data for some time interval and display the data in repeater ,div or any datacontrol. For. E.g. time interval is 15minuts and conutdown get starts , and before completion of this interval i.e. if …

Member Avatar for geniusvishal
0
142
Member Avatar for gahhon

Assume i have 3 buttons `button1, button2, button3` And each of them are firing the same method `onClick="Redirect"` ## PROBLEM ## How can i able to redirect them different pages by checking whether which button is clicked `button1.click; redirect(page1)`, `button2.click; redirect(page2)`, `button3.click; redirect(page)` how can i do this instead of …

Member Avatar for gahhon
0
143
Member Avatar for gahhon

protected void SetDestinationURL(object sender, EventArgs e) { if (loginMember()) Response.Redirect("~/Member/Home.aspx?Username=" + txtUsername.Text); else if (loginManager()) Response.Redirect("~/Manager/Home.aspx?Username=" + txtUsername.Text); else Alert.Show("Unauthorized User Access"); } protected Boolean loginMember() { SqlConnection conLogin = new SqlConnection(ConfigurationManager.ConnectionStrings["connMSJ"].ConnectionString); SqlCommand cmdLogin = new SqlCommand("SELECT Username, Password FROM Member WHERE (Username=@ID AND Password=@Pass)", conLogin); conLogin.Open(); cmdLogin.Parameters.AddWithValue("@ID", txtUsername.Text); cmdLogin.Parameters.AddWithValue("@Pass", …

Member Avatar for gahhon
0
180
Member Avatar for Singlem

I have been trying to get a single model, with multiple partail views that use that model to sumbit the form correctly. @Html.Partial("_EmployerDetails", Model) <br /> @Html.Partial("_OutcomeControl", Model) When I submit the form only the firt PatailView model is posted. The second partailview values is null. I need to modulize …

Member Avatar for LastMitch
0
165
Member Avatar for gahhon

**Hashing Method** // If the two SHA1 hashes are the same, returns true. // Otherwise returns false. private static bool MatchSHA1(byte[] p1, byte[] p2) { bool result = true; if (p1 != null && p2 != null) if (p1.Length == p2.Length) for (int i = 0; i < p1.Length; i++) …

Member Avatar for gahhon
0
176
Member Avatar for gahhon

I have a textbox which letting user to enter their password. My password format is 1. Starting at least 1 non-alphanumeric 2. Continue with alphanumeric 3. Length: 7 and above. What should i put in the validate expression? <asp:RegularExpressionValidator ID="RegExpPass" runat="server" ErrorMessage="Password Length at Least 7 With Special Character" ControlToValidate="txtPass" …

Member Avatar for gahhon
0
198
Member Avatar for gahhon

Assume i have a table `field1, field2, field3` and i have radio button list that displaying `field1, field2, field3` If the end-user selected `field2` and inserting a value into `field2` How can i do? Any Tricks? Thanks for in advance.

Member Avatar for mmcdonald
0
122
Member Avatar for giangnt

My code here, I want only product.name being updated. How do I do this ? p/s: Give me many ways to do this public ActionResult EditProduct(Product product) { if (ModelState.IsValid) { db.Entry(product).State = EntityState.Modified; db.SaveChanges(); } return View(); }

Member Avatar for k.d.m
0
88
Member Avatar for gahhon

protected void Page_Load(object sender, EventArgs e) { int count = 0; string[] categories = new string[100]; double[] yValues = new double[100]; SqlConnection conBudget = new SqlConnection(ConfigurationManager.ConnectionStrings["connMSJ"].ConnectionString); SqlCommand cmdCount = new SqlCommand("SELECT COUNT(*) AS COUNT FROM DailyBudget WHERE (Username=@username)", conBudget); SqlCommand cmdBudget = new SqlCommand("SELECT Foods, Clothes, Drinks, Entertaiment FROM DailyBudget …

Member Avatar for gahhon
0
1K
Member Avatar for gahhon

protected double[] getValues(int ColumnCount) { double[] value = new double[ColumnCount]; SqlConnection conGetValue = new SqlConnection(ConfigurationManager.ConnectionStrings["connMSJ"].ConnectionString); SqlCommand cmdGetValue = new SqlCommand("(SELECT * FROM DailyBudget WHERE (Username=@username)) EXCEPT (SELECT Username FROM DailyBudget WHERE Username=@username)", conGetValue); cmdGetValue.Parameters.AddWithValue("@username", Master.getUsername); conGetValue.Open(); SqlDataReader dtrGetValue = cmdGetValue.ExecuteReader(); try { int i = 0; while (dtrGetValue.Read()) { value[i] …

Member Avatar for gahhon
0
234
Member Avatar for gahhon

protected void AddTransaction(object sender, EventArgs e) { SqlConnection conAddTransaction = new SqlConnection(ConfigurationManager.ConnectionStrings["connMSJ"].ConnectionString); SqlCommand cmdAddTransaction = new SqlCommand("UPDATE DailyBudget SET @category=@amount WHERE Username=@username", conAddTransaction); cmdAddTransaction.Parameters.AddWithValue("@category", "Foods"); cmdAddTransaction.Parameters.AddWithValue("@amount", Convert.ToDouble("200")); cmdAddTransaction.Parameters.AddWithValue("@username", "mhingshiang"); conAddTransaction.Open(); cmdAddTransaction.ExecuteNonQuery(); conAddTransaction.Close(); } The `Foods` is one of the column name in `DailyBudget` table. But it can't update to the …

Member Avatar for gahhon
0
154
Member Avatar for gahhon

protected void Page_Load(object sender, EventArgs e) { double totalUsage = 0; int rowCount = getRowCount(); int columnCount = getColumnCount(); string[] xValues = getColumnName(); double[] yValues = new double[columnCount]; SqlConnection conBudget = new SqlConnection(ConfigurationManager.ConnectionStrings["connMSJ"].ConnectionString); SqlCommand cmdBudget = new SqlCommand("SELECT Foods, Clothes, Drinks, Entertaiment FROM DailyBudget WHERE (Username=@username)", conBudget); conBudget.Open(); cmdBudget.Parameters.AddWithValue("@username", "gahhon"); …

Member Avatar for gahhon
0
957
Member Avatar for gahhon

public partial class Member : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["Username"] != null) lblUsername.Text = Request.QueryString["Username"]; } public string getUsername { get { return lblUsername.Text; } } } } This is when master page load will display Username to the `lblUsername` and it success to …

Member Avatar for gahhon
0
130
Member Avatar for gahhon

How can i able to update the textbox value once the radio button selected index change and without post back method? and tricks? thanks for advance.

Member Avatar for JorgeM
0
1K
Member Avatar for gahhon

SqlCommand cmdColumnName = new SqlCommand("SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='DailyBudget' ORDER BY ORDINAL_POSITION", conBudget); // bla bla bla SqlDataReader dtrColumnName = cmdColumnName.ExecuteReader(); if (dtrColumnName.Read()) for (int i = 0, x = 1; i < count; i++,x++) categories[i] = dtrColumnName[x].ToString(); dtrColumnName.Close(); The problem said the index was out of bounded. As …

Member Avatar for JorgeM
0
123

The End.