|
I think u cant understand my problem.
|
|
|
|
|
deepthy.p.m wrote: I think u cant understand my problem.
well i managed to extract what i understood. Please be clear. What do u want???
When you fail to plan, you are planning to fail.
|
|
|
|
|
Hi
Do u have any java script wich converts English to French
Thanks
Siva
|
|
|
|
|
ROTFL
I cannot stop it...
|
|
|
|
|
Dear all
I have Developed a web application with some crystal reports.
I have deployed also on server. It runs successfully.Now problem is after generating two or three reports An error message Comes "FAILED TO OPEN REPORT" . After that no reports open. Can any body help me to sort out this problem Why this message comes.
Raghvendra Kumar Roy
|
|
|
|
|
hi,
I have imported data from csv file and binded it to grid view and now I want the data to be saved in sql server database table.
Is there any way to directly insert it?
I thought of making a loop and add the data one by one row wise but it will slow down the process as the grid has values in thousands.
any suggestion...
thanks in advance.
Vijay K.
|
|
|
|
|
Hi i am giving some ip address for smtpserver...,
How to check that smtpserver is up/down...,
If its up then i have to send mail...,
otherwise,the procees have to run later...,
How to do that?
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
There are many ways to accomplish this.
You may try pining the server (through asp.net) and if the results are positive, then go ahead and send the mail. Otherwise, notify user that the server is down due to some reasons.
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
Try to catch the exception if server is down and then send proper message
cheers,
Abhijit
|
|
|
|
|
Recetly we update our database on access. we addedd more cloumns of data on one of the tables. I have five tables on the access " active,master,customer,user,...)The table I added more cloumn is "master" table. before we had: part-no., descrption,price" now we have "part-no.,descption,price,MVC,NRC,NPN". the ASP program it will upload an excel file with part-no. and qty then it will display the data from these two tables"active and master" by active being the first choice the master the second. can you please look at this ASP code to see how can i add other column to be printed with new data. Thanks. Kamran
<!--#include file="conn.asp"-->
<!--#include file="verify.asp"-->
<html>
<head>
<title>new page</title>
<link rel="stylesheet" type="text/css" href="css.css">
<meta http-equiv="Content-Type" content="text/html;">
</head>
<body>
<form name="form" method="post" action="savexls.asp" enctype="multipart/form-data" >
<input type="file" name="file1" size="20">
<input type="submit" name="Submit" value="UPLOAD">
<p>
</p>
<%
set rst = server.createobject("adodb.recordset")
sql="select top 1 * from active"
rst.open sql,conn,1,1
%>
<table style="border-collapse: collapse" bordercolor="#C0C0C0" width="100%" id="AutoNumber3" cellspacing="1" height="0" border="1">
<tr>
<% j=0
for each x in rst.fields %>
<% fieldname=trim(x.name)
if fieldname="pn" then
fieldname="Part-No."
end if
if fieldname="price" then
fieldname="Cost"
end if
if j=2 then %>
<td width="7%" height="50" align="center" bgcolor="#E1E1E1"><b><font face="Arial" style="font-size: 11pt">Qty</font></b></td>
<td height="50" align="center" bgcolor="#E1E1E1"><b><font face="Arial" style="font-size: 11pt"><%=ucase(left(fieldname,1))&right(fieldname,len(fieldname)-1)%></font></b></td>
<% else
%>
<td height="50" align="center" bgcolor="#E1E1E1"><b><font face="Arial" style="font-size: 11pt"><%=ucase(left(fieldname,1))&right(fieldname,len(fieldname)-1)%></font></b></td>
<%
end if
j=j+1
next
%>
<td align="center" bgcolor="#E1E1E1" height="50"><b><font face="Arial" style="font-size: 11pt">Source</font></b></td>
<td align="center" bgcolor="#E1E1E1" height="50"><b><font face="Arial" style="font-size: 11pt">MVC&NRC</font></b></td>
<td align="center" bgcolor="#E1E1E1" height="50"><b><font face="Arial" style="font-size: 11pt">NPN</font></b></td>
</tr>
<%
rst.close
set rst=nothing
if request("id")=1 then
set conn1 = server.createobject("adodb.connection")
name=trim(request("name"))
FileName="xls\"&name
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source ="&Server.MapPath(FileName)&";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
Conn1.Open ConnStr
set rs = server.createobject("adodb.recordset")
set rs1 = server.createobject("adodb.recordset")
sql = "select * from [sheet1$]"
rs.open sql,conn1,1,1
do While Not Rs.EOF
i=1
for each x in rs.fields
if i=1 then
text1=x.name
end if
if i=2 then
text2=x.name
end if
i=i+1
next
'strpn=trim(rs("pn"))
strpn=trim(rs(text1))
'strquantity=trim(rs("quantity"))
strquantity=trim(rs(text2))
datafrom="None"
description=""
price=""
sql1="select * from active where pn='"&strpn&"'"
rs1.open sql1,conn,1,1
IF Rs1.Eof And Rs1.Bof Then
rs1.close
sql2="select * from master where pn='"&strpn&"'"
rs1.open sql2,conn,1,1
if Rs1.Eof And Rs1.Bof Then
datafrom="None" %>
<tr><td><font face="Arial" style="font-size: 10pt"> <%=strpn%></font></td><td> </td><td><font face="Arial" style="font-size: 10pt"><%=strquantity%></font></td>
<% for diffn=1 to j-2 %><td> </td><% next %><td><font face="Arial" style="font-size: 10pt"><%=datafrom%></font></td> </tr>
<% else
datafrom="Master"
do While Not Rs1.EOF
m=0 %><tr>
<%
for each x in rs1.fields
if m=2 then
xvalue="$"&trim(x.value) %>
<td><%=strquantity%></td>
<% else
xvalue=trim(x.value)
end if
%>
<td><font face="Arial" style="font-size: 10pt"><%=xvalue%></font></td>
<% m=m+1
next
if m<j then
for dif=1 to j-m
%><td> </td>
<%
next
end if
%>
<td><font face="Arial" style="font-size: 10pt"><%=datafrom%></font></td>
</tr>
<% rs1.MoveNext
loop
end if
else
datafrom="Active"
do While Not Rs1.EOF
m=0
%> <tr>
<% for each x in rs1.fields
if m=2 then
xvalue="$"&trim(x.value)
%> <td><%=strquantity%></td>
<% else
xvalue=trim(x.value)
end if
%>
<td><font face="Arial" style="font-size: 10pt"><%=xvalue%></font></td>
<% m=m+1
next %>
<td><font face="Arial" style="font-size: 10pt"><b><font color=#ff0000><%=datafrom%></font></b></font></td>
</tr>
<% rs1.MoveNext
loop
end if
Rs1.Close
rs.MoveNext
Loop
%>
</table>
</form>
<form name="form1" method="post" action="quote.asp?id=1&name=<%=name%>">
<b><font face="Arial" style="font-size: 11pt">Please Input Customer's NAME:</font></b>
<input type="text" name="email" size="20">
<input type="submit" name="continue" value="CONTINUE">
</form>
<form name="form2" method="post" action="quote.asp?id=1&name=<%=name%>">
<b><font face="Arial" style="font-size: 11pt">Select A Customer's Name:</font></b>
<p> </p>
<select name="email">
<%
sql3="select * from customer"
set rs3 = server.createobject("adodb.recordset")
rs3.open sql3,conn,1,1
if rs3.eof and rs3.bof then
response.write "Not record."
else
do while not rs3.eof
response.write "<option " & " value='" + Cstr(rs3("name")) + "'>" + rs3("name") + "</option>"
rs3.MoveNext
Loop
end if
rs3.close
set rs3=nothing
%>
</select>
<input type="submit" name="continue" value="CONTINUE">
</form>
<%
Rs.Close
Set Rs=nothing
Conn1.Close
Set Conn1=Nothing
Set Rs1=nothing
Conn.Close
Set Conn=Nothing
end if
%>
</body>
</html>
|
|
|
|
|
ajax tabcontainer add new tabpanel with close button
i have added the new tabpanel on button click.
and i want to remove the added tab.
i wrote as tabcontainer1.tabs.remove(tabcontainer1.activetab);
error occurs
Specified argument was out of the range of valid values.
Parameter name: value
please help me.
Bharani
|
|
|
|
|
hi,
I am quite fresh to asp.net
At the first begining, gridview will populate all data from database.
when keyword insert into text box and press "search" button, based on the keyword, it will get the data which match the keyword and populate it at gridview. I try it for weeks already but still can't solve it.
May someone help me on this?
|
|
|
|
|
I only can do the search function but at first page loading, i can't populate all the data from database. bbelow is my default3.aspx from northwind database with dbo.products table. Default3.aspx.vb does not has any code.
Default3.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default3.aspx.vb" Inherits="Default3" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Search" />
</div>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="True"
DataKeyNames="ProductID" DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="ProductID" HeaderText="ProductID" ReadOnly="True"
SortExpression="ProductID" />
<asp:BoundField DataField="ProductName" HeaderText="ProductName"
SortExpression="ProductName" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString3 %>"
DeleteCommand="DELETE FROM [Products] WHERE [ProductID] = @original_ProductID AND [ProductName] = @original_ProductName"
InsertCommand="INSERT INTO [Products] ([ProductName]) VALUES (@ProductName)"
OldValuesParameterFormatString="original_{0}"
SelectCommand="SELECT [ProductID], [ProductName] FROM [Products] WHERE ([ProductName] = @ProductName)"
UpdateCommand="UPDATE [Products] SET [ProductName] = @ProductName WHERE [ProductID] = @original_ProductID AND [ProductName] = @original_ProductName">
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="ProductName"
PropertyName="Text" Type="String" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="original_ProductID" Type="Int32" />
<asp:Parameter Name="original_ProductName" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ProductName" Type="String" />
<asp:Parameter Name="original_ProductID" Type="Int32" />
<asp:Parameter Name="original_ProductName" Type="String" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ProductName" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
|
|
|
|
|
hi all,
It has dropdownlist in gridview.
I face a difficult in update the dropdownlist.selectedvalue into database.
May someone have simple example of source code to help me on this?
|
|
|
|
|
There are lots of ways to update database from gridview.
How you are doing it?
What difficulty you are facing?
|
|
|
|
|
in my gridview, i have linkbutton for add new row. below is the code for add new gridviewrow. but for the edit and update gridviewrow i still no has any idea. may u help me?
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs)
Dim conn As New SqlConnection("Data Source=localhost;Initial Catalog=Display;Integrated Security=True;")
Try
If e.CommandName.Equals("New") Then
Dim btnNew As LinkButton = TryCast(e.CommandSource, LinkButton)
Dim row As GridViewRow = TryCast(btnNew.NamingContainer, GridViewRow)
If row Is Nothing Then
Return
End If
Dim txtPickTownCity As TextBox = TryCast(row.FindControl("PickTownCityTextBox"), TextBox)
Dim dropdownlistPickState As DropDownList = TryCast(row.FindControl("DropDownList3"), DropDownList)
Dim txtDeliveryTownCity As TextBox = TryCast(row.FindControl("DeliveryTownCityTextBox"), TextBox)
Dim dropdownlistDeliveryState As DropDownList = TryCast(row.FindControl("DropDownList6"), DropDownList)
Dim cmd As New SqlCommand("INSERT INTO [Address] ([Pick_Town_City], [Pick_State], [Delivery_Town_City], [Delivery_State]) VALUES (@Pick_Town_City, @Pick_State, @Delivery_Town_City, @Delivery_State)", conn)
cmd.Parameters.AddWithValue("Pick_Town_City", txtPickTownCity.Text)
cmd.Parameters.AddWithValue("Pick_State", dropdownlistPickState.SelectedValue)
cmd.Parameters.AddWithValue("Delivery_Town_City", txtDeliveryTownCity.Text)
cmd.Parameters.AddWithValue("Delivery_State", dropdownlistDeliveryState.SelectedValue)
conn.Open()
If cmd.ExecuteNonQuery() = 1 Then
GridView1.DataBind()
End If
End If
Catch ex As Exception
Finally
conn.Close()
End Try
End Sub
|
|
|
|
|
|
hi,
i m a beginner in asp.net
i want to ask how to change pictures in adrotator without refreshing the page in a particular way(like screensavers work)
and i dont want to use ajax....
|
|
|
|
|
Try using html maybe with a marquee?
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
i think the plan will be using ad rotator with datasource then put it into update panel(ajax) then add timer and use code behind to updatepanel.update() method evry fixed time based on the timer events
hope it help
drahmedgalal@hotmail.com
|
|
|
|
|
|
I have a requirement where i need to provide a Search facility to my web application.
Basically i will have a Search text box and a button. User can enter some words and when he clicks the button, the application should search some columns in a couple of tables and the details should be presented to the user. I don't know how to implement this.
Do any of u guys have an idea, i would be very thankful to u if u can share with me.
Thanks & Regards,
Krishna.
|
|
|
|
|
This is not a quite simple as I think.but may be this suggestion helps you
Follow these three steps
Store Procedure
First Step : Create temporary table
CREATE TABLE #TempTable
(
ID int IDENTITY PRIMARY KEY,
Column1 nvarchar(100),
Column2 nvarchar(100),
)
Second Setep: Insert matched records from other tables into temporary table
INSERT INTO #TempTable(column1,column2)
Select column1,column2 from myTable1 where column3=yourSearchingText
INSERT INTO #TempTable(column1,column2)
Select column1,column2 from myTable2 where column3=yourSearchingText
INSERT INTO #TempTable(column1,column2)
Select column1,column2 from myTable3 where column3=yourSearchingText
Third Step : Select all records from temp table
SELECT * FROM #TempTable
Best of luck
Regards
Khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Or possibly just use a UNION predicate? Better asking this in the SQL forum...
|
|
|
|
|