|
thanks fr injection attacks
even i m layman at dis...
i wnt to send stdid to another page"details aspx"
i m using response.redirect("details.aspx?cid=" & cid,false)
in details page i m retrieving it thru stdid = request.querysting("cid")
bt it gives error dat no value given to stdid
i hope u cn undertsnd.....
or give me brief idea hw cn i pass values thru pages....so dat session retain their values.
thanku
|
|
|
|
|
Please don't use SMS/TextSpeak. It makes it increadibly difficult to understand you.
fr = from
dis = this
wnt = want
bt = but
dat = that
cn = can
undertsnd = understand
hw = how
You are not saving much with these abbreviations. And the time spent by me decrypting them is just irritating. In general people will be much more receptive to your request for help if you write properly.
Now, when you log in you should not ever pass the log in token (which is what cid effectively is) via a query string. It is very easy to hack and pretend to be someone else.
You have a Session so store the value in there. You can then retrieve it from the Session in the next page.
Ditch the query string as a way of passing information (especially something as sensitive as this) between pages unless you expect the user to also use the mechanism for linking directly to some page.
|
|
|
|
|
ok...
i am storing session as if like Session("cid") = dr(0).
is this wrong way??
yes i m passin sensitive information.
but right now,i jus want it to work..
which is unfortunately not working..
Is there something like Viewstate, which can help me out..
|
|
|
|
|
parkash_C wrote: i am storing session as if like Session("cid") = dr(0).
So far so good. You are storing the value of the first column in the session.
On your other page you can then do
cid = Session("cid")
However, if no rows are returned from the database then cid won't have anything in it. Are you sure data is being returned from the database?
parkash_C wrote: Is there something like Viewstate, which can help me out..
Viewstate is for page postbacks. It has a very short lifespan. It sounds like you need a book or good article describing the state system in ASP.NET.
|
|
|
|
|
yes cid and session("cid") do get values from database ,i m sure on this.
could u just tell me d difference between cid and session("cid")
or please provide me a good link
thanks.....
|
|
|
|
|
parkash_C wrote: could u just tell me d difference between cid and session("cid")
cid is a variable in your program Dim cid, cpass . You have to make it again in the other page(s)
Session("cid") requests a value named "cid" from the Session state on your page.
parkash_C wrote: please provide me a good link
It is your code. I'm just echoing it back with corrections/suggestions.
|
|
|
|
|
parkash_C wrote: thanks fr injection attacks
Do you know what you talking about?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
I get that a lot. I suspect many people either don't speak English all that well, or don't read the article so they don't know what's actually in it and then thank me for the opposite of what I gave them.
|
|
|
|
|
yes i didnt read the article......
as per good Etiquettes i should thank the person
who is spending time on my query....
those who cannot help , they should mind their own buisness.....
@Colin
thanks for all your help
|
|
|
|
|
chill out man. There is nothing wrong you have done. Rest assured as long as you are willing to learn you will find many good people willing to help
parkash_C wrote: yes i didnt read the article......
I lost you there. What article are you talking about?
parkash_C wrote: as per good Etiquettes i should thank the person
who is spending time on my query....
Thank you, keep up the good manner
parkash_C wrote: those who cannot help , they should mind their own buisness.....
well, the best thing you can do is ignore them.
cheers
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Colin Angus Mackay wrote: I suspect many people either don't speak English all that well
Given English is not first language for many people, I don't think any one would hold that against them. What is annoying is the arrogance we see frequently. It is one thing to see broken English sentence, but completely different some one pushing his broken English to get away with unacceptable behaviour.
cheers
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Yusuf.A wrote: Given English is not first language for many people, I don't think any one would hold that against them.
I do try to take that into account. The grammarian in me wants to correct missing definite articles, incorrect verb congugations and so on. My main weakness is SMS/TextSpeak. I just can't let that one go.
|
|
|
|
|
As an additional follow up:
Yusuf.A wrote: some one pushing his broken English to get away with unacceptable behaviour
I'm not so sure about that. In some languages what is perfectly innocent to them seems aggressive to us. Take differences between Spanish and English for example.
In English I would walk in to a pharmacy and say "I would like a big packet of Enalapril 5mg, please". I tried that in Spanish once and I got looked at as if I was mad. In Spanish you would say "Give me a big packet of Enalapril 5mg". There is even the imperative verb tense for it - A set of verb congugations specifically for issuing commands. Its closest equivalent in English would be the drill seargent barking commands at the troops. To me it is very impolite. But if I translate what I think is polite into Spanish it turns out that level is reserved for addressing the monarchy.
I've also made an attempt at learning Dutch. What is interesting there is the definiteness of some phrases that turn out to be optional. For example, asking directions. The response you might get back is "You must turn left at the second traffic lights". In reality there may be many routes to your destination and you don't have to turn at that particular junction. It is just the structure of the language.
|
|
|
|
|
Colin Angus Mackay wrote: I'm not so sure about that. In some languages what is perfectly innocent to them seems aggressive to us. Take differences between Spanish and English for example.
that is true. I have been to many parts of the world and have seen/interacted with different cultures and languages. I have heard people talking their native languages which sounds like two drill sergeants going after each other.
But, what strike me is, most of that is in verbal only. In most cases, if not all times, written is quite different. There is less harsh tone. In addition, the same people when talking to outsider, specially using different language would tend to tone it down.
just my 2 cents
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
try dr(0).getsqlstring();
and not try to use cid on multiple places in like this
and yes try the session value type casting to string maybe its a enough answer for your questions.
whats this means???:
<pre></pre>cid = dr(0)
cpass = dr(1)
con.Close()
Session("cid") = cid
|
|
|
|
|
is this correct syntax request.querystring("cid")????
is this enough to retrieve the value of session from other page!!!
or some other function is also required!!!
thanku
|
|
|
|
|
The code Request.QueryString("cid") is correct.
what i feel after reading ur posts is that u r not sure of what is a session, query string....
The statment Request.QueryString("cid") doesn't read value from session but it reads values from
Response.Redirect("details.aspx?cid=" &cid, False) that what u specified in the previous page.
If u r sure that cid has valuses frm previous page,then it is sure that u can retrieve that value using Request.QueryString("cid").
To read value frm session, use some variable var=Session("cid")
then the variable var wil contain the value wat u assigned in the previous page.
Moreover viewstate is used hold values pertaining to a single page.The value stored in viewstate can't be retrieved in next page.
Before using al these things, first go through basics like what is viestate,session,application variables, query string and so on. its helps u a lot..
Happy Coding...
|
|
|
|
|
Why didn't you explicitly declare this variable ?
Like: Dim ValueFromDB as Integer
Just my preference.
|
|
|
|
|
Why would I be programming in VB is the more pertinent question?!
|
|
|
|
|
because this is asp.net forum
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
i have a filed saved in sql sever db and its data type is int.
i fetch that field from db using this code and assign it to a variable called 'ValueFromDB'
<br />
Private Sub GetMyIntDataTypeField()<br />
<br />
Dim Get_ MyIntDataTypeField_StrSQL As String<br />
Dim Get_ MyIntDataTypeField_ObjCmd As SqlCommand<br />
<br />
Dim strConn As String = ConfigurationManager.ConnectionStrings("MyConnString").ToString()<br />
<br />
<br />
Dim MyCon As SqlConnection<br />
MyCon = New SqlConnection(strConn)<br />
<br />
Get_ MyIntDataTypeField_StrSQL = "Select MyIntField from MyTable"<br />
<br />
MyCon.Open()<br />
<br />
Get_ MyIntDataTypeField_ObjCmd = New SqlCommand(Get_ MyIntDataTypeField_StrSQL, MyCon)<br />
<br />
ValueFromDB = Get_ MyIntDataTypeField_StrSQL_ObjCmd.ExecuteScalar<br />
<br />
MyCon.Close()<br />
<br />
End Sub<br />
after obtaining this value i need to perform a simple subtraction, like
a = ValueFromDB - 17.
after subtraction i am getting, a = -17.
is this because "ValueFromDB" from DB in string format?
|
|
|
|
|
Meax wrote: after obtaining this value i need to perform a simple subtraction, like
a = ValueFromDB - 17.
after subtraction i am getting, a = -17.
is this because "ValueFromDB" from DB in string format?
I think execute scalar returns the type of object.
Set a break point on the line of code to check. If you must use VB.Net I suggest setting option strict and option explicit to true.
Just cast the result as an integer.
I didn't get any requirements for the signature
|
|
|
|
|
I am using an Ajax ModalPopUp Extender where it shows on a button click. On button click,
it shows the popup modal extender and opens a Windows dialog box with Open Save and Cancel on top.
On click of Open or Save or Cancel, I want to hide the popup modal extender.
How can i achieve this.
SAJAN A PILLAI
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
|
Here is the simple code
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<br />
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick">
</asp:Timer>
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Timer1" />
</Triggers>
<ContentTemplate>
<asp:Image ID="BannerImage" runat="server" ImageUrl="~/Banners/Banner_1.gif" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
Here is the code behind
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
Dim n As Integer = New Random().Next(1, 2)
BannerImage.ImageUrl() = "banners/Banner_" + n.ToString + ".gif"
End Sub
End Class
Its line for line code microsoft ajax video # 24 theirs works mine doent
|
|
|
|