|
the browser back button will take you back to the page you were just on without going back to the server and re-loading the page, therefore the onload will not run again until the page is refreshed.
The only way i can think is to somehow delete the cache or apply some sort of method to run when the browser back button runs
|
|
|
|
|
check this article out:
http://www.codeproject.com/KB/aspnet/NoCaching.aspx
|
|
|
|
|
try this in Page Load
if(Session["UserName"] == null && Page.IsPostBack)
Response.Redirect("../Admin/HomePage.aspx");
|
|
|
|
|
Sir i have created a Table of Infomation with colomn name (Firstname, Lastname, CellNo, Address)
i use this code to display values in Gidview
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
lblError.Text = ""
BindData()
End Sub
Protected Sub BindData()
Dim connectionString As String = myDataSource.ConnectionString
Dim myConnection As New SqlConnection(connectionString)
Dim ad As New SqlDataAdapter("Select ID,FirstName,LastName,SQuestion,Answer,CellNo from Information", myConnection)
Dim ds As New DataSet()
ad.Fill(ds, "Information")
grdView.DataSource = ds
grdView.DataBind()
End Sub
I am Using Code In aspx File like this
<asp:SqlDataSource ID="myDataSource" Runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>">
</asp:SqlDataSource>
<asp:Label ID="lblError" runat="server" Text="Label"></asp:Label>
<br />
<asp:GridView ID="grdView" runat="server" AllowPaging="True"
AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" PageSize="5">
</asp:GridView>
It is working Good But i use Row Editing then I have no idea how Update these valus in Gridview. Please Help me if you can
Regards
Ahsan
|
|
|
|
|
Hi,
I am developing a application, in which i have to fetch some records from a remote database through web service and then on basis of that data i have to insert some records in our local database and after that i have to mark the remote data that inserted into local db so that it does not comes again.
So in this process after inserting inot local DB if error occurred while doing updation on remote data, then process should be rollback.
that is the issue. I tried using Enterprise Services, but it didn't work, trnsaction won't get rollback.
Can it be possible using WCF?
Please help regarding that.
AKS
|
|
|
|
|
amit_sahu wrote: Can it be possible using WCF?
No. WCF has nothing to do with database updates. It deals with communicating with things.
amit_sahu wrote: trnsaction won't get rollback
It was probably already committed. You might want to read up on using transactions in ADO.NET.
|
|
|
|
|
Dear Sir,
I am doing Payment Gateway Integration on my system
so for that I have registered one dll on my system.
Payment Gateway Integration is working properly on my system.
Now we have uploaded it on live server but it throw one execption.
Execption is:-
The Server threw an execption (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
It may be due to missing file or any other reason.
Please suggest me.
Thanks.
Sukhjeevan Singh
|
|
|
|
|
Hello Sir/Mam
some one please provide me the full source code for connecting oracle 9i and asp.net 2.0 so that i will be greatful to those who send code without not just sending only connection string alone
please
regds
venkat24
|
|
|
|
|
If you can't work it out from any of the many full examples that you can find with google, odds are good you should stop wasting your time with trying to write code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Hi All!
I have to put a validation for Australian License Number.It's required format is as per below.
Validation Maximum length of 9 characters.<br />
Alphanumeric characters only.<br />
Must have at least 4 numeric characters.<br />
Must have no more than 2 alphabetic characters.<br />
The third and fourth characters must be numeric.
can anyone please suggest any custom validation or javascript ?
Thank you,
Regards..
|
|
|
|
|
Sounds like a regular expression to me.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Yes,it can be anything.It may be a regular expression or custom validator or javascript.
Thanks for the response.
Regards.
|
|
|
|
|
Yeah, it COULD be any of those things, but I imagine that a regex is the most logical. expresso is a great tool if you need help working out a regex.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Chris,
Thanks for the quick response.
I have tried "Expresso".But I can't get the rid of it.
Regards.
|
|
|
|
|
|
Hi Vasudevan Deepak Kumar,
Thanks for response. I have "Expresso". I have tried this. But I can't figure out the correct expression. I can't make expression with numeric and alphabetic . somewhere I am wrong. I am still playing with "Expresso".....
|
|
|
|
|
U can try out for Javascript posted below
Expresso cannot work for the expressions like this. That becomes tough for Expresso.
Try this.. put the code in ur jscript
<br />
function nx(obj)<br />
{<br />
var str = document.getElementById(obj).value;<br />
if(str.length > 3 && str.length < 10)<br />
{<br />
if((str.charCodeAt(2) > 47 && str.charCodeAt(2) < 58) && (str.charCodeAt(3) > 47 && str.charCodeAt(3) < 58)) <br />
{<br />
var c = 0;<br />
var n = 0;<br />
for(i = 0 ; i < str.length ; i++)<br />
{<br />
if(str.charCodeAt(i) > 47 && str.charCodeAt(i) < 58)<br />
{<br />
n++<br />
}<br />
else<br />
{<br />
c++<br />
}<br />
}<br />
if(n < 4 && c > 2)<br />
{<br />
return false<br />
}<br />
else<br />
{<br />
return true;<br />
}<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
}<br />
else<br />
{<br />
return false;<br />
}<br />
return false;<br />
}<br />
The ASCII part is very Improtent to do the task.
I hope that will help
If work let me know.
Believe Yourself™ ™
|
|
|
|
|
Hi Gandalf!
Thanks for the reply. I have done it with different method. Thank you again..
Regards.
|
|
|
|
|
I have a directory 'UploadFiles' in my website, and I can forbidden users to visit via *.ASPX page.
(check users right in *.aspx.cs), but i can not forbidden user to visit via directly input URL in browser. like http://localhost/mywebiste/uploadfiles.jpg
I know the MembershipProvider in .NET Framework, but i think it too complex than i wanted.
and i didn't find any document to help me write a good web.config file.
so how can i solve it?
|
|
|
|
|
WuJunyin wrote: so how can i solve it?
I prefer to write a HTTPHandler which handles JPG extension. Inside the handler, do user authorizations. If user is unauthorized, display relevant messages.
|
|
|
|
|
thanks for your reply.
the JPG files just a kind of 'UploadFiles', it contains many different file types, like bmp, txt, doc, xls, mp3, avi, and so on.
i do not want to add a HTTPHander for all file types....
|
|
|
|
|
I have problem in asp.net configure file when try to go to security tab
but i don't have sql express in my machine
this message appear to me
plz i need very fast soulation because i have schedule tp finish this project or the only soulation to install sql express and work throught it
thanks alot
Message
---------
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Unable to connect to SQL Server database.
----------
md_refay
|
|
|
|
|
Is google[^] broken where you live ?
|
|
|
|
|
i have a dll . and putting a reference of that dll in my web project.
and during allocating the dynamic memory allocation , i got the following exception
Retrieving the COM class factory for component with CLSID {D8AD488C-DB92-4E50-B264-23E7C8F242E2} failed due to the following error: 80040154.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|