|
Use the setting in the configuration file and forms authentication, let the framework handle verification for you, that's why it's there.
only two letters away from being an asset
|
|
|
|
|
Please help me.I have 2 gridview in my form,the first one select I use it to display selected columns from the table,and have the command field.
**********************
This is what I want to do.When the user clicks the view button of the command field,display the second gridview and allow the checkBox(Approval) to be checked,for appovals from the manager,other control should be read-only.
*******************
How can I code the button inside the first GridView to Display the second gridview for more details.
********
Please help me
******
Thank you in advance
oga m
|
|
|
|
|
please help me with this problem
oga m
|
|
|
|
|
I think u can use the item data command event id gridview.
Where u can make the second gridview visible true.
|
|
|
|
|
Can you please help me with Item data command for my problem,I am new in progamming and don't understand most of the thing especially GridView
****************
Cause I have look in the property window of a GridView and I really can't see that
*********
Thank you in advance
oga m
|
|
|
|
|
Oga make 2nd gridview visible false on page load ovent
You can add your command button in gridvew in desig time by choosing edit columns option.
if you are not using select button for any other purpose i'll suggest use select button and change its text to "what ever you want"
then use gridviwes RowCommand event
following line of code may be helpfull for you.
int rowid=Convert.ToInt32(e.CommmandArgument);
GridViewRow gvRow=this.Gridview1.Rows[rowid];
swith (e.CommandName)
{
case "Select":
Gridview2.visible =true;
break;
}
hope this will give you idea.
|
|
|
|
|
i have a button for going back on page. it is not working .
this.btnBack.Attributes.Add("OnClick","javascript:history.back();");
or with
this.btnBack.Attributes.Add("OnClick","javascript:history.go(-1);");
help me .
thanks in advance
|
|
|
|
|
In what way is it not working?
|
|
|
|
|
it is not going one page back .
|
|
|
|
|
hi,
You can write the code like this
Button1.Attributes("onclick") = "javascript:history.go(-1);"
or
you can use this in HTML
or
you can use link like set href="javascript:history.go(-1);"
Back
-- modified at 8:22 Thursday 5th April, 2007
|
|
|
|
|
I have a site which should recover customer details using a telephone no. entered by calling txtPhoneNumber_TextChanged
TextBox ID="txtPhoneNumber" runat="server" relative" AutoPostBack="True" textChanged="txtPhoneNumber_TextChanged" OnLoad="Page_Load" />
It calls the code behind the first time i use the site.
But the next time I try to use the customer either by drop down of previous details or manual entry id does not call the change method.
What I really need is a field exit event ??
Has anyone any ideas
Thanks
|
|
|
|
|
Hello Everybody, I have XML Serilized data stored in the database. Now I want to Deserialze that data at run time. Anybody know how deserialze data at Run time.
Thanks in Advance
|
|
|
|
|
Hi
I have problem, i currently using asp with ms access and i want to dispaly record one time with 10 records,
please help me
................
|
|
|
|
|
Dear All,
I am making web application using Asp.net C#(Visual Studio2005). And Sql server 2000 as a back End
I am generating report using crystal report 11.
I am populating data to crystalreportviewer. My question is can we arrange or place crystal reportviewer to a particular area .
Thanks
regards
imran khan
|
|
|
|
|
Use html table or asp.net panel or even a custom control.
|
|
|
|
|
Hi
I need to write a regular expressions that will find out a <pre> tag and replaces all HTML tags inside that tag till it finds ending of that <pre>. Any help on writing regular expressions for this will be highly appreciated.
|
|
|
|
|
How can i get tab strip in asp.net 2003. PLease tell me.
Mohinder Singh
|
|
|
|
|
i have one html file .In that html file i am entering login name and password when i click submit button i want to submit data to database using asp.net code.How can i do that......Please help me to solve this problem
|
|
|
|
|
Make your html button a server side control.
Right click the button and select 'run as server side'
Now you can write the logic of saving the data in your database in the button_click event using asp.net code
Gautham
|
|
|
|
|
anujose wrote: i want to submit data to database using asp.net code
Strange ? Why you are suffering this much. Why don't you add aspx page and write the code in codebehind page ?
If you are so specific with this HTML page, then you can set the action url of HTML page form to your aspx page. Then in aspx page using request.form("value") get the value. and do the operations
|
|
|
|
|
i don't want to show the aspx form.i just want to pass 2 values from html file to aspx file and in aspx file i want to validate the username and password
|
|
|
|
|
Hi to all,
I am trying to use FormsAuthentication in my Project but I am getting some Problems.
Code 1:
Private Sub imgbtnSubmit_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgbtnSubmit.Click
Try
'call the ValidateLogin function
If ValidateUser(txtLoginId.Value.ToUpper, txtPassword.Value.ToUpper) Then
If Request.Params("ReturnUrl") <> "" Then
FormsAuthentication.RedirectFromLoginPage(txtLoginId.Value, True)
Else
If iStatus = 1 Then
FormsAuthentication.SetAuthCookie(txtLoginId.Value, True)
Server.Transfer("EntrySubscriberDtls.aspx")
Else
FormsAuthentication.SetAuthCookie(txtLoginId.Value, True)
Server.Transfer("ViewSubscriberDtls.aspx")
End If
End If
Else
Response.Redirect("VendorLogin.aspx", True)
End If
Catch ex As Exception
'Throw error Message
txtLoginId.Value = ""
txtPassword.Value = ""
lblErrorMsg.Text = "Invalid Username or Password"
End Try
End Sub
Code 2:
Function ValidateUser(ByVal UserName As String, ByVal Pssword As String) As Boolean
Dim vsVndrPwd As String
Dim dtVendorDet As New DataTable
Try
'For cheking Valid UserName and Password
Session("Username") = userName
vsVndrPwd = Nothing
dtVendorDet = Objallschoolinfo.ValidateLogin(txtLoginId.Value.ToUpper.Trim)
iStatus = Convert.ToInt32(dtVendorDet.Rows(0).Item("bStatus"))
vsVndrPwd = dtVendorDet.Rows(0).Item("vsPassword".ToUpper.Trim)
Catch ex As Exception
lblErrorMsg.Text = ex.Message
End Try
'If Not Found the Record
If (vsVndrPwd Is Nothing) Then
Return False
End If
'if Found the Record
Return (String.Compare(vsVndrPwd.ToUpper.Trim, Pssword.ToUpper.Trim, False) = 0)
End Function
Code:3 Web.config file
<authentication mode="Forms">
<forms name=".NavinsForm" loginurl="./Vendor/VendorLogin.aspx" protection="All" path="/" timeout="30">
<authorization>
<deny users="?">
<allow users="*">
-----------------
Error: When iStatus=1 It's throw the Error:"Thread was being aborted."
When iStatus=0 It's throw the Error:"Error executing child request for ViewSubscriberDtls.aspx."
Mohan Balal
|
|
|
|
|
hi!
your problem is the Server.Transfer method in both cases. you have to do a Response.Redirect(...) with the client so that he gets the auth-cookie. have a look at the differences of both methods in your VS-help.
Make sure that you catch ThreabAbortException which is thrown by Response.Redirect.
in your case:
Private Sub imgbtnSubmit_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgbtnSubmit.Click
Try
...
Catch exc as ThreadAbortException
' Do nothing here
Catch ex As Exception
'Throw error Message
txtLoginId.Value = ""
txtPassword.Value = ""
lblErrorMsg.Text = "Invalid Username or Password"
End Try
End Sub
-walter
|
|
|
|
|
Thanks for you reply. Now, I change the Code:
Try
'call the ValidateLogin function
If ValidateUser(txtLoginId.Value.ToUpper, txtPassword.Value.ToUpper) Then
If Request.Params("ReturnUrl") <> "" Then
FormsAuthentication.RedirectFromLoginPage(txtLoginId.Value, True)
Else
If iStatus = 1 Then
Response.Redirect("EntrySubscriberDtls.aspx")
Else
Response.Redirect("ViewSubscriberDtls.aspx")
End If
End If
Else
Response.Redirect("VendorLogin.aspx", True)
lblErrorMsg.Text = "Invalid UserName or Password"
End If
Catch ex As Exception
'Throw error Message
lblErrorMsg.Text = ex.Message
End Try
--------------------------
In Both Case: Error is:"Thread was being aborted."
I am Using Backend code VB.NET and ASP.NET 1.1
Mohan Balal
|
|
|
|
|
As I said before, you have to catch System.Threading.ThreadAbortException. ThreadAbortException is thrown exactly after you do a Response.Redirect. This is normal and it's because the .NET-Framework informs itself that the current thread is beeing aborted. Your problem was that you generally catch every type of exception. Instead you must catch the ThreadAbortException BEFORE you catch any other Exception types. Before you go on, take a look on the documentation of "System.Threading.ThreadAbortException", afterwards it will be clear why you get the message "Thread was being aborted."
so change your code to this:
Try
'call the ValidateLogin function
If ValidateUser(txtLoginId.Value.ToUpper, txtPassword.Value.ToUpper) Then
If Request.Params("ReturnUrl") <> "" Then
FormsAuthentication.RedirectFromLoginPage(txtLoginId.Value, True)
Else
If iStatus = 1 Then
Response.Redirect("EntrySubscriberDtls.aspx")
Else
Response.Redirect("ViewSubscriberDtls.aspx")
End If
End If
Else
Response.Redirect("VendorLogin.aspx", True)
lblErrorMsg.Text = "Invalid UserName or Password"
End If
Catch ex as System.Threading.ThreadAbortException
' Do nothing here, just catch the exception
Catch ex As Exception
'Throw error Message
lblErrorMsg.Text = ex.Message
End Try
hope that helps
- walter
|
|
|
|