|
Hi
Thanks for the reply.
But what i am trying to ask is - For Instance there is a country table and i just want to retrieve France from the database and to be displayed as a checkbox in the web form.
For this do i have to set a text property of the checkbox to France or is it possible to get it populated from database itself.
Like for checkboxlist you have something like below:-
checkboxlist1.DataSource = getvaluefromdatabase;
checkboxlist1.DataTextField = "asd";
checkboxlist1.DataValueField = "wer";
checkboxlist1.DataBind();
|
|
|
|
|
Hi,
How to use save File Dialog Box in asp.net+C#.net. Any related Controls?
First thing is that any save file dialog box is there in asp.net.
Regards,
Palanivel
|
|
|
|
|
Ya is there and you Google it. Do you want to upload a file to a server ... Correct. Server control is there.
|
|
|
|
|
Thanx. When I click the button (ie)it should show like the save file dialog and ask for file name to save and store the full path in a string type variable in asp.net with c#. its urgent.
|
|
|
|
|
|
NO This feature is not use in ASP.net
If you want to save any file then make a dynamic link.
And when clicking on this link it will ask to save file.
Regards
Atul
|
|
|
|
|
You're wrong. Passing a file through a binary write, will create a save file dialog.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I have an application developed using Visual Studio 2005 and VB.Net which displays data from an Access database. I can launch it from within a GIS system (Manifold) by doubl-clicking a point on a map drawing. This passes parameters and the name of the .aspx page to lunch so as to display the data on the database associated with the point. The application is run on a PC under localhost
The problem is that unless I have already launched the ASP.Net Development Server the .aspx page will not display - get not able to display type of error message. Is there some way I can ensure that Asp.Net Development Server is always launched - either every time the PC is switched on, or by some code is the home page of the application?
Also:
a)is there a way of always making the ASP.Net Development Server run irectly under the root localhost port at present it usually is Port 1347.
b) If I deploy the application to another PC which does not have Visual Studio loaded, what do need to ensure the PC has installed to run .aspx pages?
|
|
|
|
|
I think you are using the built-in wev server which comes with VS 2005. This web server will be launched only when you run the web application from VS 2005. Instead, you can use IIS to host your web application.
Windows XP based PCs have IIS ver 5.x. You can use that to deploy you application so that you don't need to lauch everytime.
|
|
|
|
|
Ramesh - thanks for reply. I've investigated further and the problem seems to be with the fact that the Access database is opened. When I open the GIS application, because the GIS links to the Access database, the database is opened. When I try to open the .aspx page with localhost
ie, using Internet Explorer,
http://localhost/HA4Com/chamber.aspx?cname=2977-001
get error message file already in use
Exception details: System.Data.OleDb.OleDbException: Could not use; file already in use
If however I use the VStudio Development Server:
http://localhost:1347/HA4Com/chamber.aspx?cname=2977-001
it works Ok. Looks like VStudio development Server happy that Access database already open, but IIS is not.
Any way I can make localhost/IIS to accept the database already opened?
|
|
|
|
|
I can use Session on login.aspx.cs.
so I used like this.
// Session["Id"]= id;
and I can see components of Session, when I type "Session".
but I can't use that another aspx.cs. page, for example, board.aspx.cs.
There are only two values. SessionPageStatePersister and SessionParameter.
That is all;;
I don't know why...
please let me know..
|
|
|
|
|
that class file is not inherited System.Web.UI.Page class ? If it is then you will be getting Session while development.
|
|
|
|
|
Oh, THank you very much.
you are right.
that class file was not inherited System.Web.UI.Page class.
Really thank you.^^
|
|
|
|
|
Hi all,
Iam using a hidden textbox in my form...when i update the value of the Hidden textbox in server side - when i check a checkbox , and i take the value of textbox in client side in a button click .
The value of the textbox reamins empty qwhen i take the value in client side
client side code::
var str= document.getElementById("Hdncode").value;
when i update the value of textbox in clent side it takes but when i update thro server side it not updating ...
in myForm i didnt wrote any code to clear the textbox value any wer then y it happens any reason ..
can any one help me
|
|
|
|
|
post your server side code for better understanding
One person's data is another person's program.
--J.Walia
|
|
|
|
|
This is the server side code for check changed
Private Sub chkselallitems_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles chkselallitems.CheckedChanged
dim str as string
For i = 0 To grdexam.Rows.Count - 1
str+= grdexam.Rows(i).Cells(1).Value & ","
next
hdncode.value=str
End Sub
when i updatethe hdncode.value in server side it is not reflecting if i take in client side
can any one tell the reason
|
|
|
|
|
I'm making a login page with ASP.NET with C#.
and I know that it needs to use Session for saving information of loggined user.
so I used Session like this on "login.aspx.cs" with Login View Control.
[login.aspx.cs]
// Database query.
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Join"].ConnectionString);
SqlCommand cmd = new SqlCommand("SELECT * From User WHERE id = @ID", con);
cmd.Parameters.AddWithValue("@ID", ((TextBox)LoginView1.FindControl("TextBox1")).Text);
string name = rd["name"].ToString();
string pw = rd["password"].ToString();
string pw1 = ((TextBox)LoginView1.FindControl("TextBox2")).Text;
string id = rd["id"].ToString();
// Save to Session variables. There are a lot of components about Session. Keys, Item, Add,
//and so on..
Session["memberid"] = id;
Session["membername"] = name;
if ((string.Equals(pw, pw1)) == true)
{
FormsAuthentication.RedirectFromLoginPage(name, false);
}
....
And I made codes like this whether lggined user is same with Writer on board or not.
[Board.aspx]
public static bool IsWriter(string pdsId, string Writer)
{
string sql = "Select id From t_Pds Where boardId = @boardId And writer = @writer";
SqlCommand cmd = new SqlCommand(sql, DbConn.GetConn());
cmd.Parameters.AddWithValue("@boardId", pdsId);
cmd.Parameters.AddWithValue("@writer", Writer);
cmd.Connection.Open();
string result = (string)cmd.ExecuteScalar(); // result = ID of writer value.
cmd.Connection.Close();
// I can't use Session. When I use "Session", there are no components of Session.
// There are only two values of Session. ( SessionPageStatePersister , SessionParameter)
if (Session["memberid"] == result) //ERROR.
{
return true;
}
else
return false;
}
}
|
|
|
|
|
Cross-posting won't help you.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
How do I get a aspx page function in App_code class file in asp.net 2.0.
please sent a demo code.
|
|
|
|
|
You cannot get a function defined in the aspx code behind file in the App_Code class file. Because the instance of the aspx class is created based on the request by the browser in IIS at run time. You can try a static function but it isn't good practice.
You need to define the functions used across the application in another App_Code class file.
|
|
|
|
|
Hi,
In a gridview i have taken the three buttonfields.At one time i am showing the gridview with those three buttonfields.But at some time i dont want to show those three buttonfield i.e., i want to make it invisible.
How can i do it...
Thanks in advance..
|
|
|
|
|
Do you want to make invisible the columns of the three button fields in the GridView or you want to make invisible the button fields in some rows?
|
|
|
|
|
i want to make those three columns invisible.
|
|
|
|
|
Assume that the three button field columns starts from 4th column of the GridView, then
gvYourGridView.Columns[3].Visible = false;
gvYourGridView.Columns[4].Visible = false;
gvYourGridView.Columns[5].Visible = false;
|
|
|
|
|
Hi,
I have defined a hyperlink in a gridview but the problem is i want extract the value of that hyperlink in a textbox.since i am trying it i am getting a null value.Hyperlink is the 1st column in the gridview and also i am using the update panel.
Please any body can solve it..
Thanks in advance.
|
|
|
|