|
Thanks, I'll wait for the next crush now.
%^)
|
|
|
|
|
In addition, you can also give the VS 2005 web project[^] a try, basically it allows you create a web project in VS 2005 like you are used to with the VS 2003.
|
|
|
|
|
i want to drag and drop list box item in the tree view. in c#
any ideas ,
thanks in advance.
|
|
|
|
|
Hi,
I have created user controls, and also i displayed to placeholder dynamically.
Now i could not read valures from this control.
Any one please help me.
Regards
Raja
|
|
|
|
|
To read the value from the user control, you can simply expose it as a public property of the control, at runtime you can cast the user control to the real type of it, and access the public property. Also, if you are using the ASP.NET 2.0, you may need to use the Reference directive so that you can do the type casting.
|
|
|
|
|
Dear friends,
i want to connect news server from my c# web application. i m working in client machine.
i had used the following code, but, i got some system.dll error.
TcpClient tcpClient = new TcpClient();
tcpClient.Connect("www.nipsys.com", 119);
i want to connect the newsserver with out admin permission its possible.
Please any one give solution for this. its very urgent for me.
|
|
|
|
|
hi
I am using Visual studio 2003 server and i have installed Microsoft IE WebControls since I want to use certain methods and properties which is not supported by the microsoft i want to uninstall but i dont know how to do it.
I am going install some other product but confused which is best-AdvancedWebControls,ComponentArt,telerik r.a.d.treeview ,obout inc,Otrix,Panoramic netware,aspnetexpert.com.Can anyone guide me in this regard.
sasi
|
|
|
|
|
sasire18 wrote: i want to uninstall but i dont know how to do it.
Do you see it listed in the Add/Remove Programs window?
sasire18 wrote: Can anyone guide me in this regard.
You may need to trade off your requirements and budget. Here we used telerik in some projects, and it meets all what we need, the ComponentArt is also a good one.
|
|
|
|
|
Could anyone tell me what is the advantage of URL rewriting?
leo
Kathmandu, Nepal
|
|
|
|
|
|
Hi,
I'm writing a web service, when I use this URL: http://host/myWebservice.asmx?wsdl then the WSDL file appears.
Now, I want to add more param to myWebservice as wsdl file:
for ex: I want to add myParam
http://host/myWebservice.asmx?myParam=123
How can I do this,
Thanks,
Hung
|
|
|
|
|
|
Hi,
I am very new at this database thing, so there is alot of stuff which I am unclear about. For starter, I am using visual studio 2005 to create my server and publish it to a remote server. After I publish it, I tried to open it through its HTTP URL but I have runtime error. It is because I did not setup an IIS at my development server? Just for my information, the server computer should also have OS right? So should I go over to my development server and setup the IIS? Because for my local machine, I am required to setup the IIS to view my files. My server files are done on my local machine and so the path is http://localsite/.., so am I missing some important steps that will assure my server files to work at my developement server which is a remote server in my case. One last question, I tried to create a website at my developement server but the visual studio display an error saying that my development server does not have any frontpage extension thingy, so could that be the thing that cause all my problems? Sorry for these long essay questions. But thank you for reading!
-=Kenneth=-
LvL 1 at Database developement. >.<
|
|
|
|
|
|
Thanks, it had been helpful but I have one last question. Do I need to setup IIS for my website to be able viewed by remote computers?
|
|
|
|
|
Basically, if you want to access(view) your web site from a remote machine using the browser, then your web site needs to be hosted in the web server IIS. If you want to view locally, you can simply use the ASP.NET built-in server and it only serves the 'local' requests.
|
|
|
|
|
I've just started playing around with ASP.NET. I run into problem with the datagrid. My intention is to use the "EditItemIndex" feature to get one of the rows converted into edit-boxes instead of plain test.
My problem is that I can't seem to get edit-boxes, instead the row to be edited remains in plain text.
I am using the "create columns automatically at run-time" option. Could this be the problem? I have tried both to handle the event when the "Edit" button is pressed and to set the EditItemIndex = 1 from start. Neither of it seem to work.
Here is the code of the example where the EditItemIndex is set to one from start:
-------- HTML ----------------------------------------------
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="Test1.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:DataGrid id="dgResult" style="Z-INDEX: 101; LEFT: 280px; POSITION: absolute; TOP: 104px" runat="server" Width="328px" Height="392px" EditItemIndex="2"></asp:DataGrid>
</form>
</body>
</HTML>
-------------- END OF HTML ------------------------------------------------
--------- CODE BEHIND -------------------------------------------
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Test1
{
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.DataGrid dgResult;
private void Page_Load(object sender, System.EventArgs e)
{
string sqlQueary;
string connectionString = "server=localhost; database=Northwind; uid=sa; pwd=xxxxx;";
SqlConnection conn = new SqlConnection(connectionString);
sqlQueary = "SELECT CustomerID, CompanyName FROM customers";
SqlCommand sqlCom = new SqlCommand(sqlQueary, conn);
conn.Open();
dgResult.DataSource = sqlCom.ExecuteReader();
dgResult.DataBind();
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
--------- END OF CODE BEHIND ------------------------------------
Any idea of what could be wrong is appreciated!
|
|
|
|
|
Hi there,
When you have the AutoGenerateColumns set to true , the datagrid will generate the BoundColumns based on the specified datasource. And one more thing is that you are using the SqlDataReader which basically provides a way to retrieve a read-only, forward-only stream of data. So the automatically generated bound columns all have the ReadOnly[^] property set to true , and as a result of this you don't see the datagrid is in the edit mode. In your case, you either set the AutoGenerateColumns to false and declare the columns for the control or use another type of the datasource like the DataSet, DataTable, ....
|
|
|
|
|
Thanx pal!
I changed AutoGenerateColumns into false and voala.
|
|
|
|
|
Greetings to everyone,
I am implementing a Web Service that will make a SELECT query from a database and then return a dataset.
I am also implementing a client application that will run on a Pocket PC and which will "consume" the web service. In order to test the web service, the client application only has a textbox, a button and a listbox. It looks like this:
http://i8.photobucket.com/albums/a21/Hambos/client.jpg
The Server Application (web service) compiles ok. I can test the web service by entering the string input, then pressing invoke, and I get the query result (in xml).
The Client Application also compiles successfully, but when I try to debug it, I get the error :
System.Net.WebException was unhandled
StackTrace:
σε System.Net.HttpWebRequest.finishGetResponse()
σε System.Net.HttpWebRequest.GetResponse()
σε System.Web.Services.Protocols.WebClientProtocol.GetWebResponse()
σε System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse()
σε System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke()
σε System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke()
σε Client_Application.GetIngredients.AllergyON.GetIngredients()
σε Client_Application.Form1.button1_Click()
σε System.Windows.Forms.Control.OnClick()
σε System.Windows.Forms.Button.OnClick()
σε System.Windows.Forms.ButtonBase.WnProc()
σε System.Windows.Forms.Control._InternalWnProc()
σε Microsoft.AGL.Forms.EVL.EnterMainLoop()
σε System.Windows.Forms.Application.Run()
σε Client_Application.Program.Main()
I would be grateful if someone could take a look at my code and indicate any errors.
*******************************
SERVER APPLICATION (Web Service)
*******************************
// This code creates a DataSet object by running a query
// against the t_Ingredients table in the "AllergyON" database
// on SQL Server 2005.
namespace AllergyON
{
using System;
using System.Collections;
using System.Configuration;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Data.OleDb;
public class AllergyON : System.Web.Services.WebService
{
public AllergyON()
{
}
private void InitializeComponent()
{
}
// Here starts the code that returns the Ingredients
// list from the AllergyON SQL Server database
[WebMethod(Description = "AllergyON GetIngredients WebMethod")]
public DataSet GetIngredients(string food_name)
{
if (food_name == "")
food_name = "%";
DataSet ds = new DataSet();
//creating the connection
string conString = "server=****; uid=**** ; pwd=**** ; database=AllergyON_db";
System.Data.SqlClient.SqlConnection gi = new SqlConnection(conString);
try
{
gi.Open();
}
catch (Exception e)
{
return null;
}
// The SqlCommand contains the SQL select statement and
// the connection object
SqlCommand cm =
new SqlCommand("select t_Ingredients.Ingredient_Name "+
"from t_Ingredients inner join (t_Foods inner "+
"join Foods_Ingredients on "+
"t_Foods.Food_ID = Foods_Ingredients.Food_ID)"+
"on t_Ingredients.Ingredient_ID = Foods_Ingredients.Ingredient_ID "+
"WHERE t_Foods.Food_Name = '"+food_name+"';", gi);
SqlDataAdapter da = new SqlDataAdapter(cm);
da.Fill(ds,"Ingredients");
gi.Close();
return ds;
}
}
}
***************************
And here is the Client Application
***************************
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;
namespace Client_Application
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
// The Web Service returns the data as a DataSet to the
// client application and the client application holds on
// to that DataSet and binds it to the "listbox1" listbox
private void button1_Click(object sender, EventArgs e)
{
AllergyON.AllergyON temp = new AllergyON.AllergyON();
DataSet ds = temp.GetIngredients(this.textBox1.Text);
listBox1.Items.Clear();
// a single line of code is responsible for pulling
// the entire dataset down to the client side.
// The DataSet is now an object that has all the
// capabilities of the ADO.Net DataSet class
for (int x = 0; x < ds.Tables["Ingredients"].Rows.Count; x++)
{
listBox1.Items.Add(ds.Tables["Ingredients"].Rows[x].ToString().Trim());
}
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
// listBox1.Items.Clear();
}
}
}
|
|
|
|
|
how can i add media player like avi,mpg to my project asp.net with vb.net ?
i want to press button and media player work ?
thank you very much ! please ?
|
|
|
|
|
Hi there.
You can use the Object[^] element to host a player on the web page .aspx, and use the client side script to handle the start/pause/stop actions of the player. You can use the search comments functionality of the site to look for the sample code posted in the past.
|
|
|
|
|
I want to customise browser to display data. It must be looks like a VB form(Hide all bars-menu,task,addressand close button etc.) Plz help me
|
|
|
|
|
When using window.open you can remove some of those, but not all. Menu, address and such can be removed. The status bar can only be removed if the site is added to trusted sites. The close button can not be removed.
---
b { font-weight: normal; }
|
|
|
|
|
Search for help on "Chromeless windows" on google.
Best Regards,
Darpan Gogia
|
|
|
|