|
|
Hello To Everyone,
I used as follow:
dim pass as string
pass="Hemant"
TextBox1.Text = pass
i'm wrting the code Page_load...
it is working for label but not textbox
but nothing is coming in textBox....
What is problem.?
Suggest me what eRRor is ther..
Thank You.
-- modified at 1:36 Tuesday 19th June, 2007
|
|
|
|
|
Where are you using this code?
only two letters away from being an asset
|
|
|
|
|
i'm wrting the code Page_load...
it is working for label but not textbox
-- modified at 1:34 Tuesday 19th June, 2007
|
|
|
|
|
It would be helpful to post your code. Are you setting the textbox anywhere else?
only two letters away from being an asset
|
|
|
|
|
Hi,
I have taken Input(File) html control for uploading of files to the server.It's working good on a local machine.When set up is done at server, it's not working.
The problem i noticed is that when i attach a file from my machine to the server, server is considering the file is from it's machine and raises the exception(File does'nt exist in the path specified).i.e,It is taking the file locally even the file attached is from client machine.
I would take the FileUpload control(server control) but our entire application is being developed using client callback.So i opted for Input(File) html control for uploading of files.
plz help me out of this.
|
|
|
|
|
Hi,
Iam working in a webapplication in which I am using RSA cookie authentication to login. I login using secure RSA ID in which i login using different users with different Tokens such as Admin , client etc.., for ex.. if i login using Admin account and RSA pincode i have to redirect to a different destination page than that of the client account's destination page. The thing is that i have written RSA secured Cookie for login in a page called Authorize.aspx as follows in the HTML page of Authorize.aspx:
<%
Dim RSACookieAPI
'//Response.Cookies["RSACookieAPI"].Expires = DateTime.Now.AddYears(-30)
RSACookieAPI = Server.CreateObject("Rsacookieapi.RSACookie")
%>
Hello <%=RSACookieAPI.RSAGetUserName() %>
<%
session("rsauser")=RSACookieAPI.RSAGetUserName()
%>
<%
Response.Redirect("auth.aspx")
%>
My question is that when i click logout in the destination page for each account the RSA cookie's time frame and user's session should expire and come to the home page. I don't know how to end the RSA cookie's session as i have different accounts in each page from which i logout. So pls help me with this issue. i think i have confused u a bit with my question. Sorry for that. pls help me with this issue.
Thanks and Regards
Vijay.
|
|
|
|
|
Try This
protected void Session_End(Object sender, EventArgs e)
{
Response.Cookies["__rsauser"].Expires = DateTime.Now.AddDays(-1);
}
manojchilhate
|
|
|
|
|
Thans Manoj,
But how can i call this procedure in my source page, as i click the home link i have to go to a page called UnAuth.aspx in which i have to remove my session completely and have to go to the Home page. So i have to write the coding only in UnAuth.aspx. For that i can't use the cookie i have created in Auth.aspx. How can i call that RSACookie which was initialised in Auth.aspx. pls help me with this issue Manoj.
Regards
Vijay.
|
|
|
|
|
hi
i have check avilability button.it will check username avialable or not(it works fine)
i have CAPTCHA concept in my form.if i click check avilability button ,page reloaded CAPTCHA image refresh another picture displayed.how can i avoid page refresh
regards
saravanan
|
|
|
|
|
You will notice this problem when your form performs an insert to the database. If you have an insert using a primary key on a sequence or auto-increment column, then the end-user can possibly insert many rows by hitting the refresh browser button several times.
Hope this will Help you.
Regards,
Satips.
|
|
|
|
|
hi satips
Any Possiblity to avoid this using AJAX
regards
saravanan
|
|
|
|
|
Yes it is possible to use AJAX to check for the availability without causing a postback event to be generated by the button click. An easy way is to use Microsoft Atlas, or Web Extentions, or whatever the name of the day is, and place a UpdatePanel control on your page.
only two letters away from being an asset
|
|
|
|
|
Clicking a button on the web page has nothing to do with inserting into a database.
only two letters away from being an asset
|
|
|
|
|
You can implement Client Callback feature in order to avoid page refresh.
|
|
|
|
|
Hi ,
Can any one please tell me how to convert our aspx page into different languages.
My exact requirement is ....
I have to develop a site in two languages.can any one please help me and guide me in this.
Thanks in Advance.
Bino Varghese
|
|
|
|
|
|
thank you will check the link above
|
|
|
|
|
Hi
I want to add controls to the Wizard control(ASP.NEt 2.0) dynamically like
wzdGoals.WizardSteps[wzdGoals.ActiveStepIndex].Controls.Add(htmlGenCntl); Please note that htmlGenCntl will contain hierarchy of controls based on the current step.
Further still in order to retain the values it has been suggested we create these controls in protected override void OnInit(EventArgs e) but then based on the activestepindex i want to add controls. But ActiveStepindex at this point is zero. So how do i conditionally add the controls.
What is the resolution for the same ?
Thanks
Rajaraman.S
|
|
|
|
|
What are common causes of the following exception?
SQLBindParameter not used for all parameters
I've read that if I did not use as many "?" in my insert statement as there are fields in the database, then that exception would be thrown. However, I've made sure that their numbers matched. I'd appreciate it if you would look into this problem. Thanks for your help.
-- modified at 23:37 Monday 18th June, 2007
|
|
|
|
|
|
Thanks for replying but none of what I've read helped since I'm using ODBC to connect to my database and it does not support named parameters. It however supports the use of ? marks. The people who had the same problem in the forum that you linked to, were using sql and their solution does not help me.
|
|
|
|
|
hi, i need to write a code to add record into the access database in 3 table. which are actor, director and movie. when the user click the submit button it will add the details into the respective table. i have done the movie table. Now i need to do the actor n director table. for my actor aspx there is a dropdown list for user to select if the user select a actor n click the add button the selected item will be display in the listbox, if the user select others then they need to enter the name in the text box and when the user click the add new the name in the textbox will be added into the listbox. And same for the director then the user click the submit button the record in the lsitbox will be added into the access database in the actor n movie table. below is the code that i have done so far. please advice. thanks in advance.
HTML source
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Add.aspx.vb" Inherits="WebApplicationDvd._Default" %>
<title>Untitled Page
<asp:label id="AddNewDvd" runat="server" designtimedragdrop="8" font-bold="True"
="" font-names="Times New Roman" font-size="14pt" width="240px">Add new DVD Record | | | | <asp:label id="Moviename" runat="server" font-size="14pt" width="112px">DVD Title: | <asp:textbox id="txtmovieName" runat="server"> | <asp:label id="Actor" runat="server" font-size="14pt" width="112px">Actor: | <asp:dropdownlist id="DropDownList1" runat="server" enabletheming="True" width="132px" datasourceid="SqlDataSource1" datatextfield="Actor_Name" datavaluefield="Actor_Name">
<asp:listitem>
<asp:button id="btnAdd" runat="server" text="Add" width="72px">
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="<%$ ConnectionStrings:dvd_rentalConnectionString2 %>"
="" providername="<%$ ConnectionStrings:dvd_rentalConnectionString2.ProviderName %>" selectcommand="SELECT [Actor Name] AS Actor_Name FROM [Actor]">
<asp:textbox id="txtActorname" runat="server">
<asp:button id="btnAddNew" runat="server" text="Add New">
<asp:listbox id="lstbxActor" runat="server" height="94px" width="166px">
<asp:button id="btnDelete" runat="server" text="Delete">
| <asp:label id="Director" runat="server" font-size="14pt" width="112px">Director: | <asp:dropdownlist id="DropDownList2" runat="server" width="138px" datasourceid="SqlDataSource2" datatextfield="Director_Name" datavaluefield="Director_Name">
<asp:button id="btnAddD" runat="server" text="Add" width="64px">
<asp:sqldatasource id="SqlDataSource2" runat="server" connectionstring="<%$ ConnectionStrings:dvd_rentalConnectionStringdirector %>"
="" providername="<%$ ConnectionStrings:dvd_rentalConnectionStringdirector.ProviderName %>" selectcommand="SELECT [Director Name] AS Director_Name FROM [Director]">
<asp:textbox id="txtDirector" runat="server">
<asp:button id="btnAddNewD" runat="server" text="Add New">
<asp:listbox id="ListBox2" runat="server" height="102px" width="168px">
<asp:button id="btnDeleteD" runat="server" text="Delete">
| <asp:label id="language" runat="server" font-size="14pt" width="112px">Language: | <asp:textbox id="txtlanguage" runat="server"> | <asp:label id="Numberofdisc" runat="server" font-size="14pt" width="145px">Number of Disc: | <asp:textbox id="txtNoofDisc" runat="server"> | <asp:label id="Studio" runat="server" font-size="14pt" width="112px">Studio: | <asp:textbox id="txtStudio" runat="server"> | <asp:label id="ReleaseDate" runat="server" font-size="14pt" width="112px">Release Date: | <asp:textbox id="txtReleaseDate" runat="server"> | <asp:label id="Price" runat="server" font-size="14pt" width="112px">Price: | <asp:textbox id="txtPrice" runat="server"> | <asp:label id="Quantity" runat="server" font-size="14pt" width="112px">Quantity: | <asp:textbox id="txtQuantity" runat="server"> | | | <asp:button id="btnSubmit" runat="server" text="Submit"> | |
<asp:calendar id="Calendar1" runat="server">
VB code
Partial Public Class _Default
Inherits System.Web.UI.Page
'Public atMydropdownlist As DropDownList
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim Moviename
Dim Actorname
Dim Director
Dim Language
Dim Numberofdisc
Dim Studio
Dim ReleaseDate
Dim Price
Dim Quantity
Dim sql
'Dim asql
Dim DBconn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("dvd_rental.mdb"))
DBconn.Open()
Moviename = Request.Form("txtmovieName")
Actorname = Request.Form("txtActorname")
Director = Request.Form("txtDirector")
Language = Request.Form("txtLanguage")
Numberofdisc = Request.Form("txtNoofdisc")
Studio = Request.Form("txtStudio")
ReleaseDate = Request.Form("txtReleaseDate")
Price = Request.Form("txtPrice")
Quantity = Request.Form("txtQuantity")
sql = "INSERT INTO Movie(MovieName, MovieLanguage, Numberofdisc, Studio, ReleaseDate, Price, Quantity) "
sql = sql & "VALUES('" & Moviename & "'"
sql = sql & ",'" & Language & "'"
sql = sql & ",'" & Numberofdisc & "'"
sql = sql & ",'" & Studio & "'"
sql = sql & ",'" & ReleaseDate & "'"
sql = sql & ",'" & Price & "'"
sql = sql & ",'" & Quantity & "')"
Dim dbquery As New OleDb.OleDbCommand
dbquery.CommandType = CommandType.Text
dbquery.CommandText = sql
dbquery.Connection = DBconn
dbquery.ExecuteNonQuery()
DBconn.Close()
DBconn = Nothing
Response.Redirect("Webdvd.aspx")
End Sub
Protected Sub Calendar1_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged
End Sub
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
'Dim DBconn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("dvd_rental.mdb"))
DropDownList1.DataValueField = "Others"
End Sub
Protected Sub txtActorname_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtActorname.TextChanged
End Sub
Protected Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
If DropDownList1.SelectedValue <> "Others" Then
lstbxActor.Text = DropDownList1.SelectedValue
ElseIf DropDownList1.SelectedValue = "Others" Then
txtActorname.Focus()
End If
End Sub
End Class
|
|
|
|
|
ling_luv wrote: Moviename = Request.Form("txtmovieName")
Why do you do your insert in the page load ? What if someone refreshes the page ? Why use the Form and not txtmovieName.Text ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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, thanks for ur help, i did nt write abny code in the page load. i have change the txtmoviename which u have written. thanks. but how abt the actor n director? please advice. thanks
|
|
|
|