|
I am relatively new to ASP application development. I have created a database application that runs on the Web. I have now finished the application and it is running on my machine using the Localhost connection. Now I want to deploy it to the web and company intranet. How does one go about this? Do I have to compile the application as some pages contain a lot of VB .Net code or they are deployed as they are?
EmbassyPhiri
|
|
|
|
|
EmbassyChikafahPhiri wrote: Do I have to compile the application as some pages contain a lot of VB .Net code or they are deployed as they are?
You shouldn't have to in theory, as long as you don't have database connection strings hardwired into the code or anything like that.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have a FormView that is connected to SQL Server. I want to insert new record to it, OK. When I open the FormView I want one or more of the fileds to be a dropdown list or listbox that make the user choose one of the list that is in that filed. Also, the content of the dropdown list is suppose to be taken from a store data (from a table) in the database.
Thanks a lot for your help and I wish someone to help so that I could solve this problem...
-- modified at 4:00 Monday 30th July, 2007
|
|
|
|
|
|
How we can upgrade/change an Application Pool running process to System user?
I want to use HttpListener but there is no permission.
I can't change this option directly from server because this isn't a standard option.
How can i do this with scripting or etc?
Any suggestion will appreciate.
Thanks.
|
|
|
|
|
In fact my problem is working with HttpListener in server side to listen some ports like 8080.
No one can help me?
|
|
|
|
|
hello yaar,
Write the code in Web.config---->app settings or HTTP Handlers u will get.
ok
Murali
|
|
|
|
|
How can I convert(Parse) String to Time?
e.g. I have this varchar (4:30) in 24 hours style or (4:30 AM) and I want to parse it to Time?
What should I do?
Thank you for your help...
-- modified at 7:11 Sunday 29th July, 2007
|
|
|
|
|
hello
just try this code:
DateTime dt=Convert.ToDateTime([your string]);
msma
|
|
|
|
|
I put three dropdownlists in formview control.Two of them have OnSelectIndexChanged events.The problem is First one firing its own event but second one also firing SelectIndexChanged event of First one only when Item is selected...
TSRK
|
|
|
|
|
hi
i think that you create your first dropdown list and then copy it twice .
so i think you set the event_name for first one and so,second and third one have the event with same name of first one
so you can check the event name of them and set the unique name for every event of them
good luck
msma
|
|
|
|
|
Hello
This is My code:
<asp:Repeater ID="myRepeater" runat="server">
<HeaderTemplate>
<table border="2">
<tr>
<td colspan="5" height="30"><asp:Label runat="server" ID="LblName" Text="dddddddddd"></asp:Label></td>
</tr>
<tr>
<td>Grade Name</td>
<td>Institution Name</td>
<td>AcomplishesYear</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#DataBinder.Eval(Container.DataItem, "GradeName")%></td>
<td><%#DataBinder.Eval(Container.DataItem, "InstitutionName")%></td>
<td><%#DataBinder.Eval(Container.DataItem, "AccomplishYearNum")%></td>
</tr>
</ItemTemplate>
</asp:Repeater>
what i want to do is to write instead "ddddddddddd" in the header a real Data comming from a Session?
it's mean how i can refer to this label in the repeater from the VB code
("I want to say sorry to christin Garus I didn't get his point" if he can clarify it to me, thanks christian)
Thanks in advance
Assaf
|
|
|
|
|
Assaf82 wrote: instead "ddddddddddd" in the header a real Data comming from a Session
You can feed the value of session to the Label from CodeBehind right?
Assaf82 wrote: christin Garus
His name is Christian Graus right?
|
|
|
|
|
How i can refer to the label inside the repeater, from the code behind
to set his value
-- modified at 11:00 Sunday 29th July, 2007
Assaf
|
|
|
|
|
Oh, I remember this now.
You keep asking questions in new threads, and each time, progress in trying to make sense of your question is lost. Please stick to a thread, so people can follow the things you fail to explain.
As I explained before, you can use the <% tags to call a method in your code behind, or just to grab the value from the session. If you couldn't follow that, you really should buy a good ASP.NET book and read it, because it's reasonably straightforward.
in your code behind
protected string GetValue()
{
string s = Session["theString"];
return s ?? ""; // This just returns "" if the string is null
}
in the aspx
Text='<%=GetValue()%>'
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, would you please point me to a good tutorial on authenticating a user with a database. I have read about user authentication using Web.Config but since it does not suit my need I would like to use database to authenticate my user. Thank you in advance for your help.
|
|
|
|
|
Are you trying to do this with database users or with a user table (containing username, password, etc) in the database?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi, I'm planning to store user names in the UserName field and passwords in the Password field of my Members table. Then I'm planning to check the text value of the TB_UserName text box and the value of TB_Password text box against the database. So I guess I'm using a user table. I don't know what else to do other than what I've just described. Thanks for your response.
|
|
|
|
|
You can go that route, then query for the username and password, if you have a match, great log the user on, if not tell them log on failed...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi thanks for your time, there is one thing that worries me about using the database to log someone in. Since I'm not using Web.Config I won't have cookie for tracking the use. Also suppose I redirect someone to a restricted page once they have been authenticated. Then later on after knowing what the url is, can he or she go there directly by copying the url of that page and pasting it into the url box?
-- modified at 2:15 Sunday 29th July, 2007
|
|
|
|
|
You need to have anything that uses the username and password to be done with the POST method and not GET. You can also implement a timeout period for your log ins. I think I remember mentioning to you in the past about Session variables, they can come in handy for this type of thing...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hello Everybody
I dont have any idea about rss feed. Im doing a project which called HelpDesk. What I would like to do is,
1. Like CodeProject MessageBox. Every single user is able to put their message.
2. Top Message and so on......
Any help and guide line will be great help for me
Sarfarj Ahmed
|
|
|
|
|
Hi..
After adding header and footer usercontrols to all web pages in my asp.net 1.1 website some events are not fired any more (or may be not handled)like DataGrid events and DropDownList events(In many pages).I build the project many times but nothing changes.Could any one tell me Why adding header footer usercontrol cause this problem and how to solve it?.
-- modified at 20:18 Saturday 28th July, 2007
I am too late but i will never give up
|
|
|
|
|
I have been trying to create a user control that allows users to add and remove emails from their profiles and I havent been able to wrap my head around ViewState and Postbacks.
When the profile page is loaded there is one table row with 3 cells:
cell(0) contains two imagebuttons, one to add a new row and another to delete that particular row.
cell(1) contains a label
cell(2) contains a textbox to add the email
I want the user to click the add imagebutton to add a new row and the delete imagebutton to delete that particular row.
My problem is I cant seem to be able to add more than 2 rows. And if I click the buttons in the second row I don't seem to hit Click event handler for the clicked button.
Here is the code:
----------------------------------------------------
Imports System.Configuration
Public Class UC_Emails
Inherits System.Web.UI.UserControl
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
End Sub
Protected WithEvents plcEmailTable As System.Web.UI.WebControls.PlaceHolder
Protected WithEvents tblUserEmails As System.Web.UI.WebControls.Table
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
AddEmailRow(maxEmails)
End Sub
#End Region
Dim maxEmails As Integer = CInt(ConfigurationSettings.AppSettings("MaxEmails"))
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
plcEmailTable.Controls.Add(tblUserEmails)
End Sub
Private Sub AddEmailRow(ByVal maxrows As Short)
If Not tblUserEmails.Rows.Count > maxrows Then
Dim eRow As New TableRow
'cells
Dim imgCell As New TableCell
Dim lblCell As New TableCell
Dim txtCell As New TableCell
Dim chkCell As New TableCell
'plus imagebutton
Dim plusImg As New ImageButton
plusImg.CssClass = "PlusMinusImage"
plusImg.ImageUrl = CType(Session("imagespath"), String).Replace(".", "~") & _
"btn_plus.jpg"
AddHandler plusImg.Click, AddressOf btnAdd_Click
'minus imagebutton
Dim minusImg As New ImageButton
minusImg.CssClass = "PlusMinusImage"
minusImg.ImageUrl = CType(Session("imagespath"), String).Replace(".", "~") & _
"btn_minus.jpg"
AddHandler minusImg.Click, AddressOf btnDelete_Click
'label
Dim lblEmail As New Label
lblEmail.Text = "Email:"
'text box
Dim txtEmail As New TextBox
txtEmail.CssClass = "EmailTextBox"
'primary check box
Dim chkPrimary As New CheckBox
chkPrimary.Text = "Primary email"
'add itrems to cells
imgCell.Controls.Add(plusImg)
imgCell.Controls.Add(minusImg)
lblCell.Controls.Add(lblEmail)
txtCell.Controls.Add(txtEmail)
chkCell.Controls.Add(chkPrimary)
'add cells to row
eRow.Cells.Add(imgCell)
eRow.Cells.Add(lblCell)
eRow.Cells.Add(txtCell)
eRow.Cells.Add(chkCell)
tblUserEmails.Rows.Add(eRow)
End If
End Sub
Private Sub DeleteEmailRow(ByVal sender As Object, ByVal remaminingRows As Integer)
If Not tblUserEmails.Rows.Count = 1 Then
Dim btnClicked As ImageButton = CType(sender, System.Web.UI.WebControls.ImageButton)
Dim row As TableRow
Dim cell As TableCell
cell = CType(btnClicked.Parent, TableCell)
row = cell.Parent
tblUserEmails.Rows.Remove(row)
End If
End Sub
Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)
AddEmailRow(maxEmails)
End Sub
Private Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)
DeleteEmailRow(sender, tblUserEmails.Rows.Count)
End Sub
End Class
----------------------------------------------------------------
Please help in pointing out where I'm getting it wrong
-- modified at 13:21 Saturday 28th July, 2007
|
|
|
|
|
Viewstate is applied to the page's controls between Init and Load, so if you dynamically change your control in Page_Load, Viewstate won't be applied to them, and the page won't know what event caused the postback, and your event won't fire.
if you do this:
plcEmailTable.Controls.Add(tblUserEmails)
in PageInit instead, it should work.
-- modified at 13:53 Saturday 28th July, 2007
Duh, sorry, forget that. I see you're already doing your dynamic creation in PageInit. I read it too quickly.
|
|
|
|