|
Hi,
I developed a web based application in my pc. i want other user access my site.
In IIS server what are the steps to be followed ( through intranet).
Other than IIS, i have to do anything..
please guide me,
thanks,
murugavel
|
|
|
|
|
Whats the machine's OS?
If XP, better deploy it in a Server since XP does not support more connections (MAX 10 connections is support).
Create a website in server and deploy your website there. You could find the deployment steps easily in internet (Google).
|
|
|
|
|
Here are few steps through which u can access ur application using intranet
1) Open IIS
2) Right Click "Default Website"
3) On properties click New -- Virtual Directory
4) Name the virtual directory (e.g. Hidaya)
5) Browse and select the directory on your harddrive
6) Now set permissions, plz give full permission at this stage
- Now the directory is created
-Change its properties by right clicking on it -- Properties
- In the Application Box name, enter any name ( e.g. xyz)
- On ASP.NET Tab, you would see the ASP.NET version, plz select 2.0.
Press OK to apply the changes.
you can access this website as :
http://localhost/DirecotroyName/yourpage.aspx (e.g. default.aspx or index.aspx, whatever the name of your default page is)
Try it out else let me know i will guide u further
Regards
rameez
|
|
|
|
|
Hi,
In dropdown list i have a header data items, which i was configured in Gridview.
My question is whenever change the selected index in dropdown (it contails header data of the table) it select the gridview particular columns
Example.
in employee table, we have a columns of empid, ename, salary etc.
DropDown box contains all headers which i mentioned above.
In drop down i select ename means, in grid view ename columns is selected.
please guide me.
Thanks,
Murugavel.
|
|
|
|
|
What does 'selected' mean ? I mean, what do you want to do as a result of the selection ? Showing the row a different color with jquery or even after a postback, is easy enough, but what does it mean ?
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Hello. I have a DataGridView that is bound to a DataTable. If the user types in values for all the columns for the first row, then clicks into a column in the second row (empty), and then clicks back into the first row he just typed, then an empty row is added to the DataGridView. I'm guessing that somehow the AddRow function is being called when the user clicks in and out of the empty row. I don't want this to happen. A new row should only be added to the DataGridView if the user types in valid
values for all the columns. Does anyone know how to fix this? Thanks.
Justin
|
|
|
|
|
Is this a ASP.NET question?
I am thinking you are asking about the DataGridView of Windows Application. Wrong Forum dude...
|
|
|
|
|
I've added an asp.net page to an existing web application comprised primarily of .asp's which use framesets. The new page (/lmw/net/default.aspx) loads into one of the frames (/lmw/index.asp) correctly and runs, but when it tries to use Javascript to call a function in the top frame like:
top.displayThis('test')
I get a Permission Denied error. Actually, if I reference anything in the top frame I get the same error. None of the top or parent properties are visible to the .aspx page. Both pages exist on the same server in the same domain.
Any explanation about what might be going on is greatly appreciated.
Thanks!
|
|
|
|
|
I would guess this has something to do with them running in different sessions, but it seems odd to me, I don't see how a server side construct can effect client side only behaviour.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Seemed very odd to me too!! I'm thinking I have client side Javascript trying to talk with client side Javascript... And what the .aspx is trying to talk with is the frameset that loaded it! Obviously, we're both missing something somewhere! Hope this makes sense to someone.
sr
|
|
|
|
|
Hi,
In my web site I have to put one button with the name "Continue to work". The website is having multiple pages. Users will work in that website, close the web page. Next when they login into the web site they click on " Continue To Work" button. So this button will take them to the page where they stopped prevously. How to implement this behaviour?
Thanks in advance.
|
|
|
|
|
You need to maintain previous state into database accordingly your required fields.
Parwej Ahamad
R & D: REST services with WCF
|
|
|
|
|
Hi everybody
I have a sql2000 database and I want to save picture in it.If I save the names of the pictures in database and save pictures in a file , how can I use these pictures in a datacontrol (grideview ,detailview ,...) I use asp.net2.0 with C#.I don't know what code should I write.pleas help me .thanks
|
|
|
|
|
bbc_sh wrote: If I save the names of the pictures in database and save pictures in a file , how can I use these pictures in a datacontrol (grideview ,detailview ,...)
If you get the file path from database, using it is trivial. Just put a HTML image tag and assign this URL as "src". If it is inside a GridView/DataGrid, put a template column and add image tag inside this.
|
|
|
|
|
can you give me a good resource.
|
|
|
|
|
PLS TRY THIS
IN HTML
<form id="form1" runat="server">
<div>
<div>
<div>
Image Title:<asp:TextBox ID="txtImgTitle" runat="server"></asp:TextBox>
</div>
<div>
Browse Image:<asp:FileUpload ID="fileImgUpload" runat="server" />
</div>
<div>
<asp:Button ID="btnUpload" runat="server" Text="Save" OnClick="btnUpload_Click" /></div>
</div>
<br />
<br />
<div>
<asp:GridView ID="GridView1" runat="server" CellPadding="5"
GridLines="None" ShowHeader="False" Width="394px" AllowPaging="True">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="imgSaved" runat="server" ImageUrl='<%# imageURL(DataBinder.Eval(Container.DataItem, "img_id").ToString()) %>'
AlternateText='<%#DataBinder.Eval(Container.DataItem,"img_title") %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</div>
</form>
CODE
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
displayImages();
}
}
protected void btnUpload_Click(object sender, EventArgs e)
{
int imageSize;
string imageType;
Stream imageStream;
// Gets the Size of the Image
imageSize = fileImgUpload.PostedFile.ContentLength;
// Gets the Image Type
imageType = fileImgUpload.PostedFile.ContentType;
// Reads the Image stream
imageStream = fileImgUpload.PostedFile.InputStream;
byte[] imageContent = new byte[imageSize];
int intStatus;
intStatus = imageStream.Read(imageContent, 0, imageSize);
// Create Instance of Connection and Command Object
SqlConnection myConnection = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
SqlCommand myCommand = new SqlCommand("insert into tbl_image(img_title,img_stream,img_type) values(@img_title,@img_stream,@img_type)", myConnection);
// Mark the Command as a Text
myCommand.CommandType = CommandType.Text;
// Add Parameters to Command
SqlParameter img_title = new SqlParameter("@img_title",SqlDbType.VarChar);
img_title.Value = txtImgTitle.Text;
myCommand.Parameters.Add(img_title);
SqlParameter img_stream = new SqlParameter("@img_stream", SqlDbType.Image);
img_stream.Value = imageContent;
myCommand.Parameters.Add(img_stream);
SqlParameter img_Type = new SqlParameter("@img_type", SqlDbType.VarChar);
img_Type.Value = imageType;
myCommand.Parameters.Add(img_Type);
try
{
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
Response.Redirect("upload.aspx");
}
catch (SqlException SQLexc)
{
Response.Write("Insert Failure. Error Details : " + SQLexc.ToString());
}
}
public void displayImages()
{
try
{
// Create Instance of Connection and Command Object
SqlConnection myConnection = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
myConnection.Open();
SqlCommand myCommand = new SqlCommand("select * from tbl_image", myConnection);
// Mark the Command as a Text
myCommand.CommandType = CommandType.Text;
SqlDataAdapter myAdapter = new SqlDataAdapter(myCommand);
DataSet myDataSet = new DataSet();
myAdapter.Fill(myDataSet);
GridView1.DataSource = myDataSet;
GridView1.DataBind();
myConnection.Close();
}
catch (SqlException SQLexc)
{
Response.Write("Data Retrival Failure. Error Details : " + SQLexc.ToString());
}
}
public string imageURL(string img_id)
{
return ("retrieveImages.aspx?id=" + img_id);
}
|
|
|
|
|
Hi, i have formview control in my page and on that i have two textboxes and button in it which display at runtime. i declare the button event in my aspx.vb
Protected Sub insertbutton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
If Not Page.IsValid Then Exit Sub
' Determine the currently logged on user's UserId
Dim currentUser As MembershipUser = Membership.GetUser()
Dim currentUserId As Guid = CType(currentUser.ProviderUserKey, Guid)
Dim connectionString As String = ConfigurationManager.ConnectionStrings("SecurityTutorialsConnectionString").ConnectionString
Dim insertSql As String = "INSERT INTO Reply(Subjects, Bodi, CommentDates UserId) VALUES(@Gameid, @Subjects, @Bodi, @CommentDates, @UserId)"
Using myConnection As New SqlConnection(connectionString)
myConnection.Open()
Dim myCommand As New SqlCommand(insertSql, myConnection)
myCommand.Parameters.AddWithValue("@Subject", subject1.Text.Trim())
myCommand.Parameters.AddWithValue("@message", message.Text.Trim())
myCommand.Parameters.AddWithValue("@CommentDates", DateTime.Now())
myCommand.Parameters.AddWithValue("@UserId", currentUserId)
myCommand.ExecuteNonQuery()
Label2.Text = "Your Comment has Been Added to our Database. Thank You"
myConnection.Close()
End Using
End Sub
and the button property
<asp:button id="Button1" runat="server" text="post" causesvalidation="true" onclick="insertbutton_Click" xmlns:asp="#unknown">
but when i click on button it shows the error like this.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'subject1' is not declared.
Source Error:
Line 39:
Line 40: Dim myCommand As New SqlCommand(insertSql, myConnection)
Line 41: myCommand.Parameters.AddWithValue("@Subject", subject1.Text.Trim())
Line 42: myCommand.Parameters.AddWithValue("@message", message.Text.Trim())
Line 43: myCommand.Parameters.AddWithValue("@CommentDates", DateTime.Now())
i place the following in my onload event
Dim drp As Label
drp = form1.FindControl("Label2")
Dim erp As TextBox
erp = form1.FindControl("subject1")
Dim crp As TextBox
crp = form1.FindControl("message")
but the object not handled at runtime.
Please help me to solve this.
Thank you
saquib
|
|
|
|
|
I Guess
Dim myCommand As New SqlCommand(insertSql, myConnection)
myCommand.Parameters.AddWithValue("@Subject", erp.Text.Trim())
myCommand.Parameters.AddWithValue("@message", crp.Text.Trim())
myCommand.Parameters.AddWithValue("@CommentDates", DateTime.Now())
|
|
|
|
|
Hi, i have sql membership provider in my database and i want to join two different tables in sqldatasource i.e. i have this select statement in my aspx page.
<asp:sqldatasource id="Games" runat="server" xmlns:asp="#unknown">
ConnectionString="<%$ ConnectionStrings:SecurityTutorialsConnectionString %>" SelectCommand="SELECT dbo.aspnet_Users.UserName, GameComment.Subject, GameComment.Body, GameComment.CommentDate, saquib.Reply.Subject, saquib.Reply.message From GameComment INNER JOIN dbo.aspnet_Users ON GameComment.UserId = dbo.aspnet_Users.UserId AND saquib.Reply.UserID = dbo.aspnet_Users.UserId ORDER BY GameComment.CommentDate DESC" />
their is three tables asp.net_users, GameComment and reply, should understand what i say on my above code.
and other query is that, i want to put the statement like that
<asp:sqldatasource id="Games" runat="server" connectionstring="<%$ ConnectionStrings:NorthwindConnectionString %>">
SelectCommand=SELECT dbo.aspnet_Users.UserName, GameComment.Subject, GameComment.Body, GameComment.CommentDate, saquib.Reply.Subject, saquib.Reply.message From GameComment INNER JOIN dbo.aspnet_Users ON GameComment.UserId = dbo.aspnet_Users.UserId AND saquib.Reply.UserID = dbo.aspnet_Users.UserId ORDER BY GameComment.CommentDate DESC" >
Please help me to solve this.
if you wish, i can show my database structure and relationship to you.
Thank you
saquib
|
|
|
|
|
To solve what? What is the problem?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
how to use the OpenFileDialog in web application using c#?
i've heared it's by using Activex but i didn't know how to do it in anyways
|
|
|
|
|
The easiest way to deal with files is using the Input tag with Type=File. Then you can upload the file to the server and deal with it there. If you want to show the user files on the server, you will have to write a custom control to do it, but I wouldn't recommend it anyway. What are you trying to do?
|
|
|
|
|
what i'm trying to do is that allowing the user to upload a file from his own computer.
anyways the 'input' inst. i couldn't use it 4 a Button Click Event Handler.
|
|
|
|
|
That's right, the Browse button on the file input won't post back to the server; you'll have to add a second button to do that. Then you'll have the file in the PostedFile property of the input.
|
|
|
|
|
how to call a javascript function from javascript file in asp.net 2.0
i added a java script file
and written two functions
now how to call these two functions
how can i get reference to that file
plz help me
thanks in advance
vijay
|
|
|
|