|
hi guys, i think you people are fine and safe.!
i got a new error while i tried to create a new asp.net webapplication. the project has been created without any files;( ie without assemblyinfo.vb,web.config or even any .aspx pages) and returned one error "SPECIFIED MODULE COULD NOT BE FOUND". when i tried to add a new aspx page to my existing application , i got another error "UNSPECIFIED ERROR".
have ever seen these errors ;
could any body say why these error occurs and how to solve this.
thanks in advance
happy programming
sebastian
|
|
|
|
|
Nothing to worry,
just re-install the dotnet your error will be rectified.
|
|
|
|
|
thanks. i was looking to solve that problem with out reinstalling the .net.
and i would like to know the reason behind this error. if u know anything detail abt this pls share....
sebastian
|
|
|
|
|
Hey man try to install IIS once agian......You will get your answer...
Regards:
Geetika Munjal
|
|
|
|
|
thank you. i ahve already reinstalled the .net
|
|
|
|
|
hi,
I need to disable back and forward button in a IE Page.
How can I do it using C#,ASP.NET?
Thanks in advance..
|
|
|
|
|
Page A calls Page B
User should not be allowed to go to Page A from Page B.
Put the code below in Page A.
To Disable Back
window.history.forward(1);
To Disable Forward
window.history.back(1);
|
|
|
|
|
hi,
I need to do custom paging of datagrid and datalist in format
<<prev 1="" 2="" 3="" 4="" next="">>
Please help. I tried many logics but no sets . please show with some code if possible.
Regards,,
max
|
|
|
|
|
This is complete code with stored procedure.Try this.This will definitely work.
Imports System.Data.SqlClient
Imports System.data
Imports System.Collections
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Pagebind(1)
End Sub
Public Function Pagebind(ByVal pg As Integer)
Dim nor As Integer
Dim repcol As Integer
nor = DropDownList1.SelectedValue
If (nor <= 4) Then
repcol = nor
Else
repcol = nor / 2
End If
DataList1.RepeatColumns = repcol
Dim con As New SqlConnection
con.ConnectionString = ConfigurationManager.ConnectionStrings("testConn").ConnectionString
con.Open()
Dim cmd As New SqlCommand
cmd.CommandText = "paging"
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@pagenumber", SqlDbType.Int).Value = pg
cmd.Parameters.Add("@pagesize", SqlDbType.Int).Value = nor
Dim dr As SqlDataReader
dr = cmd.ExecuteReader()
dr.Read()
Dim tot As Int32
tot = dr(0)
Label1.Text = pg.ToString()
Label2.Text = "of"
Label3.Text = Convert.ToInt32(tot / nor).ToString
Dim i As Int32
Dim ar As New ArrayList
For i = 1 To Convert.ToInt32(Label3.Text)
ar.Add(i.ToString())
Next i
DataList2.RepeatColumns = ar.Count
DataList2.DataSource = ar
DataList2.DataBind()
If (dr.NextResult()) Then
DataList1.DataSource = dr
DataList1.DataBind()
End If
dr.Close()
cmd.Dispose()
Button1.Enabled = True
Button2.Enabled = True
Button3.Enabled = True
Button4.Enabled = True
If pg = 1 Then
Button1.Enabled = False
Button2.Enabled = False
End If
If pg = Convert.ToInt32(Label3.Text) Then
Button3.Enabled = False
Button4.Enabled = False
End If
End Function
Protected Sub DataList2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataList2.SelectedIndexChanged
Pagebind(DataList1.SelectedIndex + 1)
End Sub
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
Pagebind(1)
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Pagebind(1)
End Sub
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Pagebind(Convert.ToInt32(Label1.Text) - 1)
End Sub
Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
Pagebind(Convert.ToInt32(Label1.Text) + 1)
End Sub
Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click
Pagebind(Convert.ToInt32(Label3.Text))
End Sub
End Class
CREATE PROCEDURE paging
@pagenumber int,
@pagesize int
/*
(
@parameter1 int = 5,
@parameter2 datatype OUTPUT
)
*/
AS
declare @srec int
declare @erec int
declare @spid int
declare @epid int
declare @rc int
set @srec=@pagenumber*@pagesize-@pagesize+1
declare c_prd scroll cursor for
select productid from products order by productid
open c_prd
fetch absolute @srec from c_prd into @spid
select @rc=count(*) from products
where productid>@spid
if @rc < @pagesize
Begin
set @erec=@srec+@rc
end
else
Begin
set @erec=@pagenumber * @pagesize
end
fetch absolute @erec from c_prd into @epid
close c_prd
select count(*) from products
select productname,unitprice,categoryname from products a ,categories b
where a.categoryid=b.categoryid
and productid>=@spid
and productid<=@epid
/* SET NOCOUNT ON */
RETURN
GO
If u have any queries then don't hesitate
kartik rathi@gmail.com
kartik rathi
|
|
|
|
|
|
Hi,
I need your suggestion, I have created an Windows service to mointer my mail id, it stores the content of the mail in the data base. I want to install my service in an remote system. I dnt know how to do it.
Plz suggest me how to install it in remotew machine........
Thanks in advance
Bye
Exelio
Know is Drop, Unknown is Ocean
|
|
|
|
|
simple
-go to visual studio command prompt
-installutil -i [path of that service i.e exe]
This command will install the service in windows services
Depending on the start mode i.e Automatic,manual the service is started
-- modified at 5:38 Thursday 14th September, 2006
|
|
|
|
|
hi,
I need to do the same that is remote installation of windows service . But i need to do this with setup .I need to create setup with automatically installs win service on remote system. Need to do by asp.net /C#
Plz help.
regards,
Max
max_dev
|
|
|
|
|
I hope this will help you
-For that you need to create a batch file i.e same command copy in to notepad and save as .bat extn.
-Make sure that service path is given properly in batch file.
-In the setup project add this batch file so that it will execute first
before starting installation of your actual web project.
|
|
|
|
|
Hi,
Thank you very much, but i want to install my windows service to an Remote system which was not in our country(Not an windows service to my system), I want to do this via Internet to an Host computer.
Plz suggest me how to do this..
Once again thank you very much
Bye
Exelio
Know is Drop, Unknown is Ocean
|
|
|
|
|
-connect to remote system using vpn client(remote desktop connection),
-once you connected you will get the gui of that remote machine at your pc
-carry this setup file from your pc to remote machine using ftp server
-run the setup in the remote machine
|
|
|
|
|
hi,
Thanks very much for your quick reply, now i am trying this option only. If i have any more doubts i will ask you
Thanks a lot
Bye
Exelio
Know is Drop, Unknown is Ocean
|
|
|
|
|
I have drop just one WebPartManager Control on page, and i am getting following error message, eventhough i did not write any code.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Any idea please.
Know Yourself Then Grow Yourself.
|
|
|
|
|
You need a database back end for the personalization feature. If you do not need it you can add
personalization-enabled=false to your WebPartManager.
Hope it helped you.
|
|
|
|
|
Thanks Dear its working now.
Know Yourself Then Grow Yourself.
|
|
|
|
|
Hello eveyone,
I wonder if I can make a webservice work via a desktop application in which this webservice manipulates a web application (for example change a label) ?
Lets me explain in detail. I want to click a button on my destop application (which is currently viewing a web application) and this will make a webservice start to work. This webservice -then- will change a label on the web applications.
Thanks for your helps and best regards.
.:: Something is Wrong ::.
|
|
|
|
|
We can call a web service from a windows application. It is like a normal call to the web service.
Ram
|
|
|
|
|
i have bind the gridview through the data set
the dataset contans the boolen values so automatical it taks the Checkbox control
now i wnat to retryiving the data from gridviw
if checkbox is checked then i need check box value
here i give the my coding
here on page load
i get the data and
bind the grid view
protected void Page_Load(object sender, EventArgs e)
{
string connString = WebConfigurationManager.ConnectionStrings ["ServerConnectionString1"].ConnectionString;
SqlDataAdapter conadapuser = new SqlDataAdapter("SSTABEG", connString);
DataSet userdateset = new DataSet();
conadapuser.Fill(userdateset);
int rescount = userdateset.Tables[0].Rows.Count;
int colcount = userdateset.Tables[0].Columns.Count;
//trueval = bool.Parse(bool.TrueString);
DataTable dt = new DataTable();
for (int i = 0; i < userdateset.Tables[0].Columns.Count; i++)
{
DataColumn dc = new DataColumn();
if (i > 0)
{
dc.Caption = userdateset.Tables[0].Columns[i].Caption;
dc.DataType = System.Type.GetType("System.Boolean");
dc.ColumnName = userdateset.Tables[0].Columns[i].ColumnName;
}
else
{
dc.Caption = userdateset.Tables[0].Columns[i].Caption;
dc.DataType = userdateset.Tables[0].Columns[i].DataType;
dc.ColumnName = userdateset.Tables[0].Columns[i].ColumnName;
}
dt.Columns.Add(dc);
}
for (int row = 0; row < userdateset.Tables[0].Rows.Count;row++ )
{
DataRow drow=dt.NewRow();
for (int col = 0; col < userdateset.Tables[0].Columns.Count; col++)
{
if (col > 0)
{
if (userdateset.Tables[0].Rows[row][col].ToString() != "1")
{
drow[col] = false;
}
else
{
drow[col] = true;
}
}
else
{
drow[col] = userdateset.Tables[0].Rows[row].ItemArray[col].ToString();
}
}
dt.Rows.Add(drow);
}
GridView1.DataSource = dt; //userdateset;
GridView1.DataBind();
}
HERE I ENABLE THE CHECK BOX CONTROL
protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
for (int i = 1; i < e.Row.Cells.Count;i++)
{
if (e.Row.Cells[i].Controls[0].GetType().FullName == "System.Web.UI.WebControls.CheckBox")
((CheckBox)e.Row.Cells[i].Controls[0]).Enabled = true;
}
}
}
IF I CLICK THE BUTTON
I WANT SAVE THE ALL DATA OF GRID
HOW CAN I RETIVE TEH DATA FROM THE GRIIEDVIEW CONTROL
protected void Button1_Click1(object sender, EventArgs e)
{
IN THE EVENT I NEED TO GET THE ALL DATA FROM GRIED VIEW(GRIED VIEW CONTAINS THE ALL CHECKBOX FIELDS
}
mohamad rafi
|
|
|
|
|
Here I had a Dropdnlist and i need to extract the datavaluefield from the list and i have to insert in some other table.My code is...
Dim dt As SqlCommand
dt = New SqlCommand("Select CustomerId,CustName from Customer", dbconn)
sedr2 = dt.ExecuteReader()
ctList.DataSource = sedr2
ctList.DataTextField = "CustName"
ctList.DataValueField = "CustomerId"
ctList.DataBind()
cmdins = "Insert into Dept(CustomerId,Deptname)values(" &dtlist.DataValueField& ",'"& TxtBox1.text&"')
This is not giving any eror,but no CustomerId value is inserting into the Table,where i have to close the datareader,and how to retrive the customerid value for insertion.Help me.Thanks in advance.
kissy
|
|
|
|
|
You can access the value of selected item like this:
DropDownList1.SelectedItem.Value.ToString()
Best Regards,
Apurva Kaushal
|
|
|
|