Click here to Skip to main content
14,739,720 members

Comments by Janardan Pandey (Top 136 by date)

Janardan Pandey 21-Jul-12 5:15am View
   
The error is giving in the line below of the given code

htmlparser.Parse(sr)
Janardan Pandey 10-Jul-12 23:29pm View
   
no but when i removing some item it is giveng error array out of bound. Why ?

My code is given below

If user_type = "User" Then
For i As Integer = 0 To Menu1.Items.Count - 1
If (Menu1.Items(i).Text = "Master") Then
For j As Integer = 0 To Menu1.Items(i).ChildItems.Count - 1
If (Menu1.Items(i).ChildItems(j).Text = "Grade Detail") Then
'Menu1.Items(i).ChildItems(j).Selectable = False
Menu1.Items(i).ChildItems(j).Enabled = False
Menu1.Items.RemoveAt(i)

End If
If (Menu1.Items(i).ChildItems(j).Text = "Machine Detail") Then
Menu1.Items(i).ChildItems(j).Enabled = False
End If
If (Menu1.Items(i).ChildItems(j).Text = "Customer Detail") Then
Menu1.Items(i).ChildItems(j).Enabled = False
End If
If (Menu1.Items(i).ChildItems(j).Text = "Max Rebar Per Cycle") Then
Menu1.Items(i).ChildItems(j).Enabled = False
End If
If (Menu1.Items(i).ChildItems(j).Text = "Plant Capacity") Then
Menu1.Items(i).ChildItems(j).Enabled = False
End If
Next
End If
Next
End If
Janardan Pandey 29-Jun-12 2:33am View
   
i want to store data of sql statment in an array. U store it in data table.
Janardan Pandey 15-May-12 2:42am View
   
this enable heading remain top at gridview
Janardan Pandey 15-May-12 2:40am View
   
I am using visual studio 10
Janardan Pandey 3-May-12 2:33am View
   
i want to display image in gridview in row wise of img field.
Janardan Pandey 26-Apr-12 7:55am View
   
How to use ADO.net to retrive image in gridview from oracle in vb.net
Janardan Pandey 21-Apr-12 5:59am View
   
the value is string received from input hidden control and want to convert in integer
Janardan Pandey 3-Apr-12 2:42am View
   
asp dot net using c#
Janardan Pandey 22-Mar-12 4:37am View
   
I mention in the question
Janardan Pandey 16-Mar-12 3:36am View
   
but please input 17/12/1984 and check it.
Janardan Pandey 14-Mar-12 5:40am View
   
Ok but i want to ask a question again like this

How to close form2 when form3 will open?
Janardan Pandey 14-Mar-12 4:39am View
   
It is an MDI application
Janardan Pandey 14-Mar-12 2:02am View
   
it is window application
Janardan Pandey 28-Feb-12 6:09am View
   
Exception is given - Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Janardan Pandey 18-Feb-12 2:08am View
   
Error - Unrecognized escape sequence
Janardan Pandey 18-Feb-12 2:08am View
   
I do this but this error is giving - Unrecognized escape sequence
Janardan Pandey 18-Feb-12 2:07am View
   
THIS ERROR IS GIVING - Unrecognized escape sequence
Janardan Pandey 18-Feb-12 2:07am View
   
the error is - Unrecognized escape sequence
Janardan Pandey 18-Feb-12 2:04am View
   
Error also giving in da.Fill(ds);
Janardan Pandey 18-Feb-12 2:03am View
   
this is my personal laptop.How can i give IP.
Janardan Pandey 16-Feb-12 4:41am View
   
Error is giving: Unknown server tag 'asp:ScriptManager'
Janardan Pandey 16-Feb-12 3:54am View
   
Page.ClientScript.RegisterStartupScript(this.GetType(), "Inserted", "<script>alert('Record Inserted Sucessfuly')</script>");

The line given above is giving error
Janardan Pandey 16-Feb-12 3:16am View
   
I am confusing in place of my coading i will add it. My Submit coading is given below

void submit(Object sender, EventArgs e)
{con.Open();
com=con.CreateCommand();
com.CommandText="UPDATE notification SET notice = '" + ta1.Value + "' where id='" + 1 + "'";
try{
com.ExecuteNonQuery();
Page.ClientScript.RegisterStartupScript(this.GetType(), "Inserted", "<script>alert('Record Inserted Sucessfuly')</script>");
}
catch(Exception ex)
{
Response.Write(ex.Message);
}
con.Close();}
Janardan Pandey 16-Feb-12 3:08am View
   
This error is giving "New line in constant"
Janardan Pandey 16-Feb-12 3:07am View
   
Error : Newline in constant

error is givening
Janardan Pandey 15-Feb-12 5:19am View
   
i am new in reports.Please guide me for crystal report.
Janardan Pandey 15-Feb-12 5:16am View
   
Actually i am totaly new about crystal report.Please help me more than it.
Janardan Pandey 15-Feb-12 5:09am View
   
cristal report
Janardan Pandey 13-Feb-12 6:28am View
   
because i am using lots of the control in my application.Thats way i want to use saperate update panel for text box and button control.

Please provide me how to use.Multiple control panel.?
Janardan Pandey 13-Feb-12 5:21am View
   
How to use multiple update panel in this html coading ? Can we use saperate update panel for text box and button in this html coding ?
Janardan Pandey 11-Feb-12 3:59am View
   
Firstly i need it in web but if posible please provide me weindow level aslo
Janardan Pandey 11-Feb-12 3:51am View
   
I am developing a web site, i need a application in this site that visitor give his like as voting by presing a button give.And persent of voting is increasing as per each voting. Please help me....
Janardan Pandey 10-Feb-12 5:41am View
   
I checked records are there.

Search and delete is working but only update is not working.When i change some information in my web page in local host and click for update to update button.But old records send only not new records taken by it.
Janardan Pandey 10-Feb-12 5:38am View
   
how to do it in ms access database directly ?
Janardan Pandey 10-Feb-12 5:37am View
   
yes
Janardan Pandey 10-Feb-12 5:36am View
   
records are available in my database table joining.
Searching and Deliting queries are working but only UPDATE is not working.
Janardan Pandey 10-Feb-12 5:36am View
   
records are available in my database table joining.
Searching and Deliting queries are working but only UPDATE is not working.
Janardan Pandey 10-Feb-12 5:24am View
   
I solved it but your suggestion more and more comfertable to solve this proble.I will use it.
Janardan Pandey 10-Feb-12 5:22am View
   
Deleted
No records are available in my database table joining.
Searching and Deliting queries are working but only UPDATE is not working.

Janardan Pandey 10-Feb-12 5:18am View
   
I dont now where it is added?
Janardan Pandey 10-Feb-12 5:07am View
   
Thanks....
Janardan Pandey 10-Feb-12 5:06am View
   
how to debug data table?
Janardan Pandey 9-Feb-12 5:36am View
   
Sorry for inconveniant.Ya i have Google but i am regularly using this site so i used this.
Janardan Pandey 9-Feb-12 5:34am View
   
Thnks
Janardan Pandey 9-Feb-12 5:34am View
   
Thanks
Janardan Pandey 9-Feb-12 3:02am View
   
I want to send some value from one page to other page in window base application in vb
Janardan Pandey 6-Feb-12 4:38am View
   
image is not shown by this.
Janardan Pandey 6-Feb-12 1:49am View
   
Thank u but help me once more how to display uploaded image in our web page during page load when we uploaded it to our web server ? Please help me ....

My program is given below which i developed.Please see and help me if any erro have it.


void page_Load(Object sender,EventArgs e)
{
con=new OleDbConnection();
con.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/kamnagroup.mdb") + "";
con.Open();
ds=new DataSet();
string sql="select photo,agent,point,aname,branch,refno from joining WHERE point=(SELECT MAX(point) FROM joining)";
da=new OleDbDataAdapter(sql,con);
da.Fill(ds,"joining");DataRow dRow=ds.Tables["joining"].Rows[0];
System.Web.UI.WebControls.Label lbl2=new System.Web.UI.WebControls.Label();
System.Web.UI.WebControls.Label lbl3=new System.Web.UI.WebControls.Label();
lbl2.Text =dRow.ItemArray.GetValue(0).ToString();
lb2.Text = dRow.ItemArray.GetValue(1).ToString();
lb3.Text = dRow.ItemArray.GetValue(2).ToString();
lb4.Text = dRow.ItemArray.GetValue(3).ToString();
lb5.Text = dRow.ItemArray.GetValue(4).ToString();
lbl3.Text = dRow.ItemArray.GetValue(5).ToString();
ds1=new DataSet();
string sql1="select photo from joining WHERE point=(SELECT MAX(point) FROM joining)";
da1=new OleDbDataAdapter(sql1,con);
da1.Fill(ds1,"joining");
string fn,SaveLocation;
int r=0;
DataRow []rs;
rs=ds.Tables["joining"].Select("refno='" + lbl3.Text + "'");
r=rs.Length;
if(r>0)
{
DataRow dr;
dr=rs[0];
lb1.Text=dr["photo"].ToString();
fn=System.IO.Path.GetFileName(lb1.Text);
Image1.ImageUrl=fn;
}
else
{
com.ExecuteNonQuery();
System.Web.UI.WebControls.Label lbl1=new System.Web.UI.WebControls.Label();
lbl1.ForeColor=System.Drawing.Color.Yellow;
lbl1.BackColor=System.Drawing.Color.Blue;
lbl1.Text="Photo Not Available";
ph1.Controls.Add(lbl1);
}
con.Close();
}
Janardan Pandey 6-Feb-12 1:28am View
   
ok i found it
Janardan Pandey 6-Feb-12 1:27am View
   
That's way i am asking wdth u

How to write this control in design time
Janardan Pandey 6-Feb-12 1:19am View
   
how to define FileUpload1 control
Janardan Pandey 4-Feb-12 6:34am View
   
ok sorry but i need this so i reposted it.But help me to solve my problem.
Janardan Pandey 4-Feb-12 6:32am View
   
where is ur answer of my question of suggestion ?
Janardan Pandey 4-Feb-12 6:17am View
   
I want how to upload file in a folder of server.
and how to define its path.

Pleasecheck this
SaveLocation=Server.MapPath("~/Kamna Group Website/"+fn);
Is it ok ?
Is this path is relevent to access image in Image1.ImageUrl

i am giving my coading

void page_Load(Object sender,EventArgs e)
{
con=new OleDbConnection();
con.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/kamnagroup.mdb") + "";
con.Open();
ds=new DataSet();
string sql="select photo,agent,point,aname,branch from joining WHERE point=(SELECT MAX(point) FROM joining)";
da=new OleDbDataAdapter(sql,con);
da.Fill(ds,"joining");
DataRow dRow=ds.Tables["joining"].Rows[0];
System.Web.UI.WebControls.Label lbl2=new System.Web.UI.WebControls.Label();
lbl2.Text =dRow.ItemArray.GetValue(0).ToString();
lb1.Text = dRow.ItemArray.GetValue(1).ToString();
lb2.Text = dRow.ItemArray.GetValue(2).ToString();
lb3.Text = dRow.ItemArray.GetValue(3).ToString();
lb4.Text = dRow.ItemArray.GetValue(4).ToString();
fn=System.IO.Path.GetFileName(lbl2.Text.Trim());Image1.ImageUrl=fn;
con.Close();
}
void sub(Object s, EventArgs e)
{
con.Open();
Int32 x = 0;string y = GetRandomString(x);
int y1=0;
string y2="Code";
string s1=t1.Text.Trim();
string m;
int r=0;
DataRow []rs;
rs=ds.Tables["joining"].Select("aname='" +s1+"'");
r=rs.Length;
if((File1.PostedFile!=null)&&(File1.PostedFile.ContentLength>0))
{
fn=System.IO.Path.GetFileName(File1.PostedFile.FileName);
//Image1.ImageUrl=fn;
fn=y+fn;
//Response.Write(fn);
//Response.Write("<br>");
SaveLocation=Server.MapPath("~/Kamna Group Website/"+fn);
photo=SaveLocation;
com=con.CreateCommand();
com.CommandText="Insert into joining(aname,fathname,dob,pob,add1,mob,city,state,pcode,panno,nominee,relation,photo,bank,branch,account,acctype,intby,codno,doi,agent,point,refno) values('" + t1.Text.Trim() + "','" + t2.Text.Trim() + "','" + t3.Text.Trim() + "','" + t4.Text.Trim() + "','" + texta1.Value + "','" + t7.Text.Trim() + "','" + t5.Text.Trim() + "','" + t6.Text.Trim() + "','" + t8.Text.Trim() + "','" + t11.Text.Trim() + "','" + t9.Text.Trim() + "','" + t10.Text.Trim() + "','" + photo + "','" + t12.Text.Trim() + "','" + t13.Text.Trim() + "','" + t14.Text.Trim() + "','" + d1.SelectedItem.Text + "','" + t15.Text.Trim() + "','" + t16.Text.Trim() + "','" + t17.Text.Trim() + "','" + y2 + "','" + y1.ToString() + "','" + y + "')";
try
{
File1.PostedFile.SaveAs(SaveLocation);
com.ExecuteNonQuery();
System.Web.UI.WebControls.Label lbl1=new System.Web.UI.WebControls.Label();
lbl1.ForeColor=System.Drawing.Color.Blue;
lbl1.BackColor=System.Drawing.Color.Yellow;
lbl1.Text="You have joined us.We will contect you soon!";
ph1.Controls.Add(lbl1);
}
catch(Exception ex)
{
Response.Write(ex.Message);
}
}
else
{
Response.Write("Please a file to upload");
}
con.Close();
}
private string GetRandomString(int seed)
{ const string alphabet = "abcdefghijklmnopqrstuvwxyz";
Random rnd = new Random((seed + DateTime.Now.Millisecond));
string result = rnd.Next(1000000, 9999999).ToString();
string alphaChar = alphabet.Substring(rnd.Next(0, alphabet.Length - 1), 1);
int replacementIndex = rnd.Next(0, (result.Length - 1));
result = result.Remove(replacementIndex, 1).Insert(replacementIndex, alphaChar);
return result;
}
Janardan Pandey 31-Jan-12 4:28am View
   
it is a string type
Janardan Pandey 31-Jan-12 4:14am View
   
now it is not giving syntex error, But also not getting updates.also not giving any error
Janardan Pandey 31-Jan-12 3:25am View
   
what is the pre tag and where it is added?
Janardan Pandey 31-Jan-12 3:17am View
   
no error is giving in update query but select and inser queries are working.
Janardan Pandey 31-Jan-12 2:38am View
   
No error is giving but sometime giving syntex error,

Can u tell me whar should be the security setting of folder which contains all file and database.I think this is the problem of security. What do u think please tell me....
Janardan Pandey 30-Jan-12 10:43am View
   
Please give me a short example to understand me batter.Please
Janardan Pandey 30-Jan-12 10:41am View
   
Please give me a short example to understand me batter.
Janardan Pandey 30-Jan-12 10:38am View
   
Please just give me a sort example for that in this code.How to write and call these statment.This will help me more and more.
Janardan Pandey 30-Jan-12 10:24am View
   
I have tried this technique but not getting success to solvethe problem.
Janardan Pandey 27-Jan-12 3:04am View
   
ok asp.net
Janardan Pandey 25-Jan-12 6:22am View
   
ok, But nice to help me.
Janardan Pandey 25-Jan-12 6:02am View
   
Ok i am not about to explain about this so ggive a small look on my HTML and CS coading given below.


HTML PART

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>

<asp:Image ID="Image1" runat="server" ImageUrl="~/blank.jpg" />
<br />
<br />
<br />
<br />
<asp:TextBox ID="TextBox1" runat="server">
<br />
<br />
<br />
<br />
<asp:TextBox ID="TextBox2" runat="server">
<br />
<br />
<br />
<asp:TextBox ID="TextBox3" runat="server">
<br />
<br />
<asp:TextBox ID="TextBox4" runat="server">
</div>
</form>
</body>
</html>


CS PART


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.Data;


public partial class Retrive_Data_From_Database_and_display_in_TextBox : System.Web.UI.Page
{
OleDbConnection con;
OleDbCommand com;
OleDbDataAdapter da;
DataSet ds;
protected void Page_Load(object sender, EventArgs e)
{
con = new System.Data.OleDb.OleDbConnection();
ds = new DataSet();
con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("~/kamnagroup.mdb") + "";
string sql = "select aname,add1,photo,point from joining WHERE point=(SELECT MAX(point) FROM joining)";
da = new System.Data.OleDb.OleDbDataAdapter(sql,con);
con.Open();
da.Fill(ds,"joining");
navigatedata();
con.Close();
con.Dispose();
}
private void navigatedata()
{
DataRow dRow=ds.Tables["joining"].Rows[0];

TextBox1.Text = dRow.ItemArray.GetValue(0).ToString();
TextBox2.Text = dRow.ItemArray.GetValue(1).ToString();
TextBox3.Text = dRow.ItemArray.GetValue(2).ToString();
TextBox4.Text = dRow.ItemArray.GetValue(3).ToString();
//Image1.ImageUrl = TextBox3.Text;
Image1.ImageUrl = dRow.ItemArray.GetValue(2).ToString();

}
}
Janardan Pandey 25-Jan-12 5:25am View
   
I checked the value is comming correct.The Image1.ImageUrl is also taking it's path but image is not comming only a icon visibled indicating a image there.
Janardan Pandey 25-Jan-12 5:01am View
   
still not showing image in the web page
Janardan Pandey 25-Jan-12 4:58am View
   
not working
Janardan Pandey 25-Jan-12 4:43am View
   
But the image is not displaying in Image1 field.Please help me to rectify.
Janardan Pandey 24-Jan-12 5:32am View
   
Deleted
But i am using ms access as a database
Janardan Pandey 24-Jan-12 3:57am View
   
But this link is not clearly telling about this needfull work.Eloborate it.
Janardan Pandey 24-Jan-12 3:43am View
   
SQL is ok but i am not cleared by coad.Because i want to fetch and display image during page load event.
Janardan Pandey 21-Jan-12 6:01am View
   
no i am not getting any error message.Only showing your record updated.But when i am going to see in the table records is not updated.
Janardan Pandey 21-Jan-12 5:22am View
   
the data which i want to update in the table not going.
Janardan Pandey 21-Jan-12 5:20am View
   
but this is not working
Janardan Pandey 17-Jan-12 6:20am View
   
yes

I want to auto generate agent code for my application which is automatically generated during page load.The code will be unique in each page load.
Janardan Pandey 17-Jan-12 6:20am View
   
I want to auto generate agent code for my application which is automatically generated during page load.The code will be unique in each page load.
Janardan Pandey 17-Jan-12 6:20am View
   
I want to auto generate agent code for my application which is automatically generated during page load.The code will be unique in each page load.
Janardan Pandey 16-Jan-12 5:52am View
   
I am getting error in this line

rs=ds.Tables["joining"].Select("agent='" + sa + "'");
Janardan Pandey 4-Jan-12 3:37am View
   
But my XML file containts are given below





<countries>
<country>
<text>Norway
<value>N

<country>
<text>Sweden
<value>S

<country>
<text>France
<value>F

<country>
<text>Italy
<value>I

Janardan Pandey 2-Jan-12 6:27am View
   
But What is the Name Space for HtmlForm form=new HtmlForm()?


Error is giving in this line for namespace for HtmlForm

Error line is given below

HtmlForm form=new HtmlForm();
Janardan Pandey 2-Jan-12 5:48am View
   
only blank document is opening by this coading
Janardan Pandey 31-Dec-11 5:27am View
   
ok
Janardan Pandey 31-Dec-11 5:27am View
   
Unable to understand and do wt u saying
Janardan Pandey 31-Dec-11 5:03am View
   
But the grid view data is not showing in ms word file which is opened
Janardan Pandey 31-Dec-11 3:40am View
   
I am getting error gvdetails of GridView must be place inside the form tag.But My grid View already placed in Form tag with runnat = server

See my HTML CODE

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Export Data from Grid to Word and Excel.aspx.cs" Inherits="Export_Data_from_Grid_to_Word_and_Excel" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div align="center">

<br />
<br />
<asp:ImageButton ID="btWord" runat="server" Width="98px"
ImageUrl="~/word_icon[1].png" Height="93px" onclick="ImageButton1_Click" />
     
<asp:ImageButton ID="btExcel" runat="server" Width="119px"
ImageUrl="~/excel[1].gif" Height="108px" onclick="ImageButton2_Click" />
<asp:GridView ID="gvdetails" runat="server" AllowPaging="True"
AutoGenerateColumns="False" DataKeyNames="qid"
DataSourceID="SqlDataSource1" BackColor="White" BorderColor="#E7E7FF"
BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal"
Width="260px">
<alternatingrowstyle backcolor="#F7F7F7">
<columns>
<asp:BoundField DataField="qid" HeaderText="qid" SortExpression="qid"
ReadOnly="True" />
<asp:BoundField DataField="qname" HeaderText="qname"
SortExpression="qname" />
<asp:BoundField DataField="sid" HeaderText="sid" SortExpression="sid" />
<asp:BoundField DataField="aid" HeaderText="aid" SortExpression="aid" />
<asp:BoundField DataField="cid" HeaderText="cid" SortExpression="cid" />
<asp:BoundField DataField="class" HeaderText="class" SortExpression="class" />

<footerstyle backcolor="#B5C7DE" forecolor="#4A3C8C">
<HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
<PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
<rowstyle backcolor="#E7E7FF" forecolor="#4A3C8C">
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
<sortedascendingcellstyle backcolor="#F4F4FD">
<sortedascendingheaderstyle backcolor="#5A4C9D">
<sorteddescendingcellstyle backcolor="#D8D8F0">
<sorteddescendingheaderstyle backcolor="#3E3277">

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:tuitionConnectionString %>"
SelectCommand="SELECT * FROM [question]">
<br />

</div>
</form>
</body>
</html>


AND CS CODE IS GIVEN BELOW

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

public partial class Export_Data_from_Grid_to_Word_and_Excel : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
gvdetails.AllowPaging = false;

gvdetails.DataBind();

Response.ClearContent();

Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", "Customers.doc"));

Response.Charset = "";

Response.ContentType = "application/ms-word";

StringWriter sw = new StringWriter();

HtmlTextWriter htw = new HtmlTextWriter(sw);

gvdetails.RenderControl(htw);

Response.Write(sw.ToString());

Response.End();
Janardan Pandey 30-Dec-11 3:49am View
   
but what about LogOut?
Janardan Pandey 30-Dec-11 3:25am View
   
but this code is not deactivate back button of index.aspx page.When i press back button of index page of explorer it is again going to previous page.
Janardan Pandey 30-Dec-11 3:07am View
   
This error is giving when i am using Session["Name"].Abandon();



Compiler Error Message: CS0117: 'object' does not contain a definition for 'Abandon'

Source Error:


Line 993:{
Line 994:FormsAuthentication.SignOut();
Line 995:Session["Name"].Abandon();
Line 996:Response.Redirect("index.aspx");
Line 997:}
Janardan Pandey 30-Dec-11 2:54am View
   
not working
Janardan Pandey 30-Dec-11 2:52am View
   
Not working sir.It is redirecting to index.aspx but when i click on back button of explorer the page will again go previous page.
Janardan Pandey 22-Dec-11 5:34am View
   
This is Not working and error is giving

Server Error in '/testing' Application.
--------------------------------------------------------------------------------

Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: Input string was not in a correct format.

Source Error:


Line 23:
Line 24: al.Add(item);
Line 25: string ss = al[Convert.ToInt32(item)].ToString();//ERROR LINE
Line 26: Response.Write(ss);
Line 27: }
Janardan Pandey 22-Dec-11 5:23am View
   
ok i am pasteing second page code



protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["items"].ToString() != null)
{

string[] items = Request.QueryString["items"].ToString().Split(',');
ArrayList al = new ArrayList();
foreach (string item in items)
{
al.Add(item);
string ss = al[item].ToString();
Response.Write(ss);
}
//string ss = al[0].ToString();
//string ss1 = al[1].ToString();

// Response.Write(ss);
// Response.Write(ss1);
}

}


please give me reply
Janardan Pandey 22-Dec-11 3:27am View
   
Thanks a lot giving hint bt not printing all value in the second form.
Con u send me after some amendment.I thisnk it is in foreach loop.I tryed a lot bt not getting succed please help me.
Janardan Pandey 21-Dec-11 5:38am View
   
what is this PRE tag
Janardan Pandey 21-Dec-11 5:38am View
   
Ya i have done this but i want to know how to store textbox in an array and how to pass multiple value in array from onepage to another page using wuerystring ?
Janardan Pandey 21-Dec-11 5:38am View
   
Ya i have done this but i want to know how to store textbox in an array and how to pass multiple value in array from onepage to another page using wuerystring ?
Janardan Pandey 21-Dec-11 2:48am View
   
not clear
Janardan Pandey 20-Dec-11 4:07am View
   
thanks i will try it in my web page.
Janardan Pandey 20-Dec-11 4:07am View
   
Thank u i will try it.
Janardan Pandey 20-Dec-11 4:07am View
   
Thank u i will try it.
Janardan Pandey 19-Dec-11 3:37am View
   
Thanks i have solved my problem by ur suggestion.

Thanks

Janardan Pandey
Janardan Pandey 19-Dec-11 2:36am View
   
No but error is giving in

rs = ds.Tables["registration"].Select("email='" + sa + "'");
Janardan Pandey 19-Dec-11 2:27am View
   
In this line error is giving exactly

rs = ds.Tables["registration"].Select("email='" + sa + "'");
Janardan Pandey 17-Dec-11 5:00am View
   
error is in cs part in the line

cmd.Parameters.AddWithValue("@rtype",sc1);

how to use sc1 in this line?
Janardan Pandey 15-Dec-11 4:59am View
   
My code is this fo login given below. but when i press go button then this error is comming.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Could not use ''; file already in use.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Could not use ''; file already in use.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


code here

<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
<%@ Page Language="C#" Debug="true" %>
<script runat="server">
OleDbConnection con;
OleDbCommand cmd,cmd1;
OleDbDataAdapter da,da1;
DataSet ds,ds1;
void Page_Load(Object s, EventArgs e)
{
Session["s"]=TextBox1.Text;
con=new OleDbConnection();
con.ConnectionString="PROVIDER=Microsoft.Jet.OleDb.4.0;Data Source=" + Server.MapPath("~/cvbank.mdb") + "";
con.Open();
ds= new DataSet();
string sql="select * from cv";
da=new OleDbDataAdapter(sql,con);
da.Fill(ds,"cv");
con.Close();
}void go(Object s, EventArgs e)
{string sa=TextBox1.Text.Trim();
string pw=TextBox2.Text.Trim();
con.Open();
int r=0,r1=0;
DataRow []rs;
DataRow []rs1;
rs=ds.Tables["cv"].Select("email='"+sa+"'");
r=rs.Length;
rs1=ds.Tables["cv"].Select("pass='"+pw+"'");
r1=rs1.Length;
if(r>0 && r1>0)
{Response.Redirect("account.aspx");
}else
{System.Web.UI.WebControls.Label lbl1=new System.Web.UI.WebControls.Label();
lbl1.ForeColor=System.Drawing.Color.Yellow;
lbl1.BackColor=System.Drawing.Color.Blue;
lbl1.Text="please enter a valid user id and password";
ph1.Controls.Add(lbl1);
}con.Close();
}void click(Object s, EventArgs e)
{Response.Redirect("cv_posting.aspx");
}
</script>
Janardan Pandey 15-Dec-11 4:09am View
   
My code is this

<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
<%@ Page Language="C#" Debug="true" %>
<script runat="server">
OleDbConnection con;
OleDbCommand cmd,cmd1;
OleDbDataAdapter da,da1;
DataSet ds,ds1;
void Page_Load(Object s, EventArgs e)
{
Session["s"]=TextBox1.Text;
con=new OleDbConnection();
con.ConnectionString="PROVIDER=Microsoft.Jet.OleDb.4.0;Data Source=" + Server.MapPath("~/cvbank.mdb") + "";
con.Open();
ds= new DataSet();
string sql="select * from cv";
da=new OleDbDataAdapter(sql,con);
da.Fill(ds,"cv");
con.Close();
}void go(Object s, EventArgs e)
{string sa=TextBox1.Text.Trim();
string pw=TextBox2.Text.Trim();
con.Open();
int r=0,r1=0;
DataRow []rs;
DataRow []rs1;
rs=ds.Tables["cv"].Select("email='"+sa+"'");
r=rs.Length;
rs1=ds.Tables["cv"].Select("pass='"+pw+"'");
r1=rs1.Length;
if(r>0 && r1>0)
{Response.Redirect("account.aspx");
}else
{System.Web.UI.WebControls.Label lbl1=new System.Web.UI.WebControls.Label();
lbl1.ForeColor=System.Drawing.Color.Yellow;
lbl1.BackColor=System.Drawing.Color.Blue;
lbl1.Text="please enter a valid user id and password";
ph1.Controls.Add(lbl1);
}con.Close();
}void click(Object s, EventArgs e)
{Response.Redirect("cv_posting.aspx");
}
</script>
Janardan Pandey 13-Dec-11 5:32am View
   
Also i have a question IS any scripting part of Update panel in coading part or same like last process?
Janardan Pandey 13-Dec-11 5:31am View
   
My all content are here

<asp:Label ID="Label1" runat="server" ForeColor="Red">



<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="33%">E-mail</td>
<td width="50%">
<asp:TextBox ID="TextBox1" runat="server" Width="231px">
<label>
 </label </label>
<td width="17%"> </td>
</tr>
<tr>
<td> </td>
<td><asp:RegularExpressionValidator ID="rev1" runat="server" Text="This is Not an Email ID" ControlToValidate="TextBox1" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"/></td>
<td> </td>
</tr>
<tr>
<td>Password</td>
<td><label>
<asp:TextBox ID="TextBox2" runat="server" TextMode="Password">
 </label></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Confirm Password</td>
<td><label>
<asp:TextBox ID="TextBox3" runat="server" TextMode="Password">
 </label></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>First Name</td>
<td><label>
<asp:TextBox ID="TextBox4" runat="server" Width="231px">
 </label></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Last Name</td>
<td><label>
<asp:TextBox ID="TextBox5" runat="server" Width="229px">
 </label></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Mobile No.</td>
<td><label>
<asp:TextBox ID="TextBox6" runat="server">
 </label></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Current Address</td>
<td><label>
<textarea name="textfield9" id="textfield9" runat="server"></textarea>
</label></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="style37">Location</td>
Janardan Pandey 7-Dec-11 4:23am View
   
In localhost it is running but after uploading in server it is not giving this error and not running
Janardan Pandey 1-Dec-11 4:02am View
   
Invalid use of '.', '!', or '()'. in query expression ''IT in Software BCA /MCA/B Tech/M Tech'.'0 to 1965''.
Janardan Pandey 1-Dec-11 4:01am View
   
error is giving

Invalid use of '.', '!', or '()'. in query expression ''IT in Software BCA /MCA/B Tech/M Tech'.'0 to 1965''.
Janardan Pandey 10-Nov-11 7:18am View
   
How to create this in aspx.I am trying but not sucess.Please help me
Janardan Pandey 8-Nov-11 4:07am View
   
Not clear, help me for complete insert statment like.Because this is my first time implimentation like this insert statment
Janardan Pandey 5-Nov-11 6:28am View
   
THE MESSAGE SHOWING EMAIL SUCCESSFULLY SENT BUT EMAIL IS NOT COMMING IN INBOX OF WEBMAIL ADDRESS.

the code is given please check

<%@ Page Language="C#" EnableSessionState="False" EnableViewState="False" Trace="False" Debug="True"%>

<%@ Import Namespace="System.Configuration" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.Security" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>
<%@ Import Namespace="System.Web.UI.HtmlControls" %>
<%@ Import Namespace="System.Net.Mail" %>

<script runat="server">
void send(Object sender, EventArgs e)
{
SmtpClient smtpClient = new SmtpClient();
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress(t1.Text, t2.Text);
smtpClient.Host = "webmail.kamnatrust.com";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add("contact@kamnatrust.com");
message.Subject = "Feedback";
message.IsBodyHtml = true;
message.Body = t3.Text;
smtpClient.Send(message);
l1.Text = "Email successfully sent.";
}
catch (Exception ex)
{
l1.Text = "Send Email Failed.<br>" + ex.Message;
}
}

</script>
<html>

<body>
<form runat="server">
<table>
<tr><td>
Enter Email<asp:TextBox ID="t1" runat="server"/><br>
Name <asp:TextBox ID="t2" runat="server"/>
<br>
Subject<asp:TextBox ID="t3" runat="server"/>
<br>
Click to send <asp:Button ID="b1" Text="send" OnClick="send" runat="server"/>
<br>
<asp:Label ID="l1" runat="server"/>
</tr>
</table>
</form>
</body>
</html>
Janardan Pandey 4-Nov-11 6:40am View
   
i dont want to give email id and password because i am doing this for sending feed back of a website.Please help me for my need
Janardan Pandey 4-Nov-11 6:39am View
   
i dont want to give email id and password because i am doing this for sending feed back.Please help me for my need
Janardan Pandey 2-Nov-11 5:43am View
   
i want to search data from databse's table and want to store in place holder for each cell's value.
Janardan Pandey 2-Nov-11 5:40am View
   
how to do this please give me hint
Janardan Pandey 2-Nov-11 5:02am View
   
I want to create lable according to column's value of a table?
Janardan Pandey 2-Nov-11 4:14am View
   
Is any procedure to send feedback bethout user id and password?Only i want to give domain name and recivers address, to address, cc address and bcc

obj.From = new MailAddress("anilmeets4u@gmail.com", "AgileLearning.com", System.Text.Encoding.UTF8);
Janardan Pandey 31-Oct-11 7:04am View
   
any one you help me
Janardan Pandey 31-Oct-11 5:33am View
   
send mail through web mail server instead of smtp server
Janardan Pandey 31-Oct-11 5:30am View
   
<pre lang="HTML">

<html>
<body>



Email From ASP.NET



<form id="MailForm" method="post" runat="server">

<asp:Label ID="Label1" Style="left: 100px; position: absolute; top: 100px" runat="server">From:



<asp:TextBox ID="txtFrom" Style="left: 200px; position: absolute; top: 100px"

runat="server">

<asp:RequiredFieldValidator ID="FromValidator1" Style="left: 100px; position: absolute;

top: 375px" runat="server" ErrorMessage="Please Enter the Email From." Width="200px"

Height="23px" ControlToValidate="txtFrom">

<asp:RegularExpressionValidator ID="FromValidator2" Style="left: 100px; position: absolute;

top: 400px" runat="server" ErrorMessage="Please Enter a Valid From Email address"

ControlToValidate="txtFrom" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">

<asp:Label ID="Label2" Style="left: 100px; position: absolute; top: 125px" runat="server">To:



<asp:TextBox ID="txtTo" Style="left: 200px; position: absolute; top: 125px"

runat="server">

<asp:RequiredFieldValidator ID="ToValidator1" Style="left: 100px; position: absolute;

top: 425px" runat="server" ErrorMessage="Please Enter the Email To." Width="200px"

Height="23px" ControlToValidate="txtTo">

<asp:RegularExpressionValidator ID="ToValidator2" Style="left: 100px; position: absolute;

top: 450px" runat="server" ErrorMessage="Please Enter a Valid To Email address"

ControlToValidate="txtTo" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">

<asp:Label ID="Label3" Style="left: 100px; position: absolute; top: 150px"

runat="server">Subject

<asp:TextBox ID="txtSubject" Style="left: 200px; position: absolute; top: 150px"

runat="server">

<asp:Label ID="Label4" Style="left: 100px; position: absolute; top: 175px" runat="server">Mail:



<textarea runat="server" id="txtContent" style="left: 200px; width: 400px; position: absolute;

top: 175px; height: 125px" rows="7" cols="24">

</textarea>

<asp:Button ID="btnSend" Style="left: 200px; position: absolute; top: 350px" runat="server"

Text="Send" OnClick="btnSend_Click">

<asp:Label ID="lblStatus" Style="left: 250px; position: absolute; top: 350px" runat="server">



</form>

</body>

</html>
</pre>
<pre lang="c#">

<%@ Import Namespace="System.Web.Mail" %>
<%@ Page Language="C#" Debug="true" %>
<script runat="server">

private void btnSend_Click(object sender, System.EventArgs e)

{

MailMessage msg = new MailMessage();


msg.To = txtTo.Text;

msg.From = txtFrom.Text;

msg.Subject = txtSubject.Text;

msg.Body = txtContent.Value;
lblStatus.Text = "Sending...";


SmtpMail.Send(msg);

lblStatus.Text = "Sent email (" + txtSubject.Text + ") to " +txtTo.Text;

}

</script>
</pre>
Janardan Pandey 31-Oct-11 4:37am View
   
I want to send mail through webmail of my website's email id?
Janardan Pandey 31-Oct-11 4:36am View
   
yes but in webmail of website
Janardan Pandey 20-Oct-11 7:20am View
   
Please give me details using short program using c# dot net
Janardan Pandey 19-Oct-11 6:45am View
   
but i am developing for a feed back form of a web site so I need not to give password in code for email id.Please help me again bethout password.
Janardan Pandey 19-Oct-11 6:41am View
   
error showing in SmtpMail.Send(objMM)
The transport failed to connect to the server.

Janardan Pandey 19-Oct-11 6:39am View
   
error showing in SmtpMail.Send(objMM)
Janardan Pandey 17-Oct-11 8:04am View
   
thanks this will help me.

thanks a lot.................................
Janardan Pandey 17-Oct-11 7:58am View
   
i want to create a feedback form of my site.i am using c#.please instruct me.
Janardan Pandey 17-Oct-11 7:57am View
   
i want to create a feed back form of my web site.please instruct me.
Janardan Pandey 21-Sep-11 5:04am View
   
Web Based