Re:
Hi all, Please help me solving following query: How to add global variable in C# window base application. This variable must be accessible to all forms. What I exactly want is: I have a variable "UserName" and "UserType". When user click "Submit" button on Login form, user name get stored … |
|
Hi, I have a scenario where in I had to sort an array, find duplicates and increment one or the other by 1. So, Eg: An array has 22, 23, 21, 21, 24 within it then, an array should be able to find 21 and increment it by 1 i.e. … |
|
Re:
Hi, I'm using asp.net together with vb.net. I am trying to develop: 1. a login page in asp.net, once user enter the correct username and password, this will be directed to the User page. 2. In User page, there will be some text fields of the user (eg. name and … |
|
I simply want to forward a request of one servlet to another servlet. Authentication Servlet gets a request from a jsp page and thus authenctication servlet passes the request to another Addtocart servlet. AuthenticationServlet Code: [CODE] RequestDispatcher rd= request.getRequestDispatcher("/Addtocart"); rd.forward(request, response); response.sendRedirect("Addtocart"); [/CODE] Addtocart servlet code: [CODE] String pid = … |
|
Instance variable does mean you will get new value with every new object created of particular class rite? I tried it myself eg: [CODE]class simpleinstcheck { static int i; void incr() { System.out.println(i++); } public static void main(String args[]) { simpleinstcheck sc= new simpleinstcheck(); sc.incr(); simpleinstcheck sc1= new simpleinstcheck(); sc1.incr(); … |
|
Exception in inserting date into database [CODE] String Fname= request.getParameter("txtfname"); String Lname= request.getParameter("txtlname"); String Uname=request.getParameter("txtuname"); String Pass=request.getParameter("txtpass"); String Email=request.getParameter("txtemail"); String Gender=request.getParameter("group1"); String Add=request.getParameter("txtadd"); java.sql.Date sqlDate = new java.sql.Date(new java.util.Date().getTime()); //out.println(""+Fname+Lname+Uname+Pass+Email+Gender+Add); Connection con= null; //if(Fname != null && Lname != null && Uname != null && Pass != null && Email … |
|
I only wanted to print the value in the string variable fname but somehow am not able to use the jsp tags effectively. [CODE] <%@page language="java" import="java.util.*" %> <% Cookie[] c= request.getCookies(); if(c==null) { response.sendRedirect("index.jsp"); } else { for (int i=0; i<c.length; i++) { if(c[i].getName().equals("Cuname")) { try{ Connection con=null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); … |
|
Re:
I am trying to create a custom tag that will write something to the screen after checking for the existance of a specific cookie. Is it possible? Thank you. |
|
Re:
Hi, i am having this 'bug' when i tried to run my application using firefox browser. At my login page, the user will display a default value of '123' and password field will display a '*'. However, i did not even define a default value for both fields. I don't … |
|
There is some problem when i check username and validate it against password from my database.After checking password from request.getParamter() it should say "You have been successfully login"... Perhaps I am getting my own else block message"Incorrect Password..." which means there is some problem with the password thing. Here is … |
|
I am facing problem in storing an image file into sql server. Following is my jsp page form tag which calls a servlet which has the storage code.. [CODE] <form name="form" action="NewServlet" method="POST" enctype="multipart/form-date"> <input type="file" name="file" size="20"> <input type="submit"> </form> [/CODE] here is my servelt code for the same … |
|
I have been assigned a task to develop an online store.I am facing a problem at the time of insertion of records into SQL Database. I am using Type4 driver. The name of the DNS is SQL. here is my servlet code [CODE] protected void doPost(HttpServletRequest request, HttpServletResponse response) throws … |
|
I got a jsp page which forwards request of two textfields txtname and txtpass to a servlet and the servlet then inserts the data into sql db and the name of the db is online_store. The db has two columns. When i checked the values are passing to the servlet … |
|
hi, am working on a project called online store using java. For the navigation menu bar i used javascript in a jsp page. The problem is am unable to see the image in navigation bar. Since i have no thorough knowledge of javascript please rectify me.Here is my code [CODE] … |
|
I have created a jsp page with some credentials of the user and this time i dont want it to pass to the validation form servlet through doGet() but through doPost(). I am facing some problem while doing this validation of none of the field could be left blank. [CODE] … |
|
Re:
[CODE] OleDbDataAdapter o = new OleDbDataAdapter("select * from tblExam1", conn); DataSet ds = new DataSet(); o.Fill(ds, "tblExam1"); DataRow r = ds.Tables["tblExam1"].NewRow(); r["exam1ID"]=324; r["patID"] = patid; r["ypsos"] = 32; ds.Tables["tblExam1"].Rows.Add(r); ds.AcceptChanges(); [/CODE] no error message. execute code normally, but row did not inserted in db what i m missing? its access … |
|
Re:
hi all will it affect my applications speed if i'll set more than 10 attribute in the session thanks in advance! |
|
I have uploaded some flash content into my html website but when i upload it on the server am unable to see it. I have registered the website of mine but unable to find a way for this problem. heres my code [CODE] <td colspan="6"><script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','932','height','359','src','Building','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','Building' ); //end … |
|
I wrote a program to get first 100 no. which are divisible by 3. Heres the code [CODE] import java.io.*; class app { public static void main (String args[]) { for(int i=0; i<=100; i++) { int x; try{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter your no."); x= Integer.parseInt(br.readLine()); if(x%3==0) { System.out.println("The … |
|
I have designed a jsp which has the following code : [CODE] <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Form Cookie</title> </head> <body> <form action="http://localhost:8080/FormCookie/AddValue"> Name : <input type="text" name="name"><br> Age : <input type="text" name="age"> <input type="submit" value="submit"> </form> </body> … |
|
What is the use of requestdispatcher in java? I know it is used to forward requests to servlets. But somebody could give me example or i mean to say a scenario which will prove effective in understanding this concept.... |
|
I am a beginner to advance java and since am learning servlet am getting some weird error in my servlet. I am trying to get the method name and this is the code which i wrote down [CODE] import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; public class NewServlet extends … |
|
Re:
Hi. my name is srikar.......and my query is How to differentiate system databases and user created databases in sql server 2005?????????????? |
|
protected void Button1_Click(object sender, EventArgs e) { MailMessage message = new MailMessage(); message.From = new MailAddress(YourEmail.Text.ToString()); message.To.Add(new MailAddress("purohit.mith@gmail.com")); message.Subject = "Message via mith from " + YourName.Text.ToString(); message.Body = Comments.Text.ToString(); SmtpClient client = new SmtpClient(); client.Host = "203.92.50.112"; client.Send(message); } // this is what i used to send the email … |
|
I am currently storing the values retrieved from the user form including image supplied by the user to sql database. The image is stored in the database but at the time when am trying to retrieve that image am getting the following exception Parameterized Query '(@name varchar(8000))select firstname,image from register … |
|
Re:
hi here i wants to show the room numbers by using the following code but it is not working. here iam giving the code plese give the proper coding [CODE] Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("guest1").ConnectionString()) conn.Open() Dim da As New SqlCommand("select room_no from guesthouse where room_no not in(select room_no from … |
|
Re:
i have a textbox and dropdownlist .whenever the dropdownlist content change then the texbox will display something and it isdifferent for each item in the dropdownlist try to sovle it by asp.net using c# |
|
Re:
[code] public partial class QuestionPage : System.Web.UI.Page { string scon = "Data Source=RBWORKSTATION2\\SQLEXPRESS;Initial Catalog=onlineexamdb;Integrated Security=True;MultipleActiveResultSets=true"; SqlDataAdapter da; SqlCommand cmd; DataSet ds; SqlConnection con; ArrayList myArrayList = new ArrayList(); public String ques, option1,option2,option3,option4; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlConnection con = new SqlConnection(scon); con.Open(); da = … |
|
Re:
hi, I have been doing my ASP.net project in C#.I am a beginner to a programming world.i have Performed executed some sql queries by writing some Connection strings..But i am looking for finding another method,which i could get simpler by calling some function like "studadapter.fill(dataset,"src table")" which is to fill … |
0 Reputation Points