12,085 Topics
|
|
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 |
|
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 ? |
|
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; … |
|
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 … |
|
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 … |
|
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, … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
any suggested trick to do that? |
|
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 … |
|
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` ? |
|
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? |
|
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 … |
|
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 … |
|
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 … |
|
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", … |
|
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 … |
|
**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++) … |
|
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" … |
|
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. |
|
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(); } |
|
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 … |
|
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] … |
|
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 … |
|
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"); … |
|
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 … |
|
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. |
|
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 … |
The End.