|
Hi,
ok here is the scenario:
I have two pages Transactions and Points. In the Transactions Page, I have an amount field. I was trying to pass on 10% of that amount to the Points page and directly set it in the Points Field.
I have tried several stuff. with some web help but it didn't work. I think what it is trying to do is open the page with a filter given the points= 10 example.
Please help
Thanks a lot
IssamK
|
|
|
|
|
how you are opening the Points page?
If you are opening it in a new window using javascript then you can pass it in querystring or you can access the field in transaction page using opener.document.getElementById(amountfield).
And if you are redirecting it from server side using response.redirect or server.transfer then you can keep it in session before redirecting and access it from session in Points page.
-----
|
|
|
|
|
|
Ok guys,
i am not very much aware of this code, i am just kinda debugging.
what is interesting to mention is this:
<smartone:themebutton runat="server" id="SaveButton" button-causesvalidation="True" button-commandname="UpdateData" <b="">Button-RedirectURL="Mypage.aspx?Points={TransactionRecordControl:FV:Amount}"
does it help?
thanks.
IssamK
|
|
|
|
|
here is the straight forward code.
in transaction.aspx add a button like:
<br />
<asp:button id="btn" runat="server" onclick="redirectToPoints" text="Open Points Page" /><br />
in code behind file for transaction.aspx.cs do this:
<br />
protected void redirectToPoints(object sender, EventArgs e)<br />
{<br />
Session["tranAmount"] = youramount;
Response.Redirect("points.aspx",true);<br />
}<br />
in PageLoad function in code behind file for points.aspx.cs do this:
<br />
protected void PageLoad(object sender, EventArgs e)<br />
{<br />
if(!IsPostBack)<br />
{<br />
textboxPoints.Text = Session["tranAmount"].ToString(); <br />
}<br />
}<br />
-----
|
|
|
|
|
hi friends,
am using one table,there is 3 field(name,address,father name) is having.but inserted totally 5 records.In all column data first character small letter.
example :(Database)
Name Address Father Name
raja salem rajasekar
laxman chennai anbuselvan
bala bangalore muthu
senthil covai durai
arun hosur ganesh
Note :
Am using front end repeater control.I want display all column data starting letter in capital letter.help me very urgent
I want display the front end form is example :
(FRONT END):
=============
Name Address Father Name
Raja Salem Rajasekar
Laxman Chennai Anbuselvan
Bala Bangalore Muthu
Senthil Covai Durai
Arun Hosur Ganesh
with Regards,
D.Thirumurugan.
|
|
|
|
|
I already respond your question dated November 16 check this[^]
-----
|
|
|
|
|
Don't cross post it makes you rather unpopular.
|
|
|
|
|
hi,
well what you could try and do is to use the charAt(0) functionality of each field. and set it to upper case.
am not a pro, however this is a primitive sample code for a form with two textboxes and a button.
Dim a As String
a = TextBox1.Text
Dim b As String
b = a.Chars(0)
b = b.ToUpper()
Dim c As String
c = b & a.Substring(1, a.Length() - 1)
TextBox2.Text = c
Good luck...
IssamK
|
|
|
|
|
I have been trying this for ages but it just doesn't seem to work. I have an image control inside a repeater control. the image control is bound to an image using the image url and databinding this when all information is called:
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<HeaderTemplate>
<h2><asp:Label ID="lbl_title" runat="server">T.R.E.E Team</asp:Label></h2>
</HeaderTemplate>
<ItemTemplate>
<div class="story">
<p>
<h1><asp:Label ID="lbl_Role" runat="server"><%#DataBinder.Eval(Container.DataItem, "Team_Role")%></asp:Label></h1><br />
<asp:Image ID="image_role" ImageUrl="%#DataBinder.Eval(Container.DataItem, "Team_Name")%" runat="server" />
<asp:Label ID="lbl_Name" runat="server"><%#DataBinder.Eval(Container.DataItem, "Team_Name")%></asp:Label><br />
<asp:Label ID="lbl_Description" runat="server"><%#DataBinder.Eval(Container.DataItem, "Team_Description")%></asp:Label><br />
<asp:Label ID="lbl_Telephone" runat="server"><%#DataBinder.Eval(Container.DataItem, "Team_Telephone")%></asp:Label><br />
<asp:Label ID="lbl_Email" runat="server"><%#DataBinder.Eval(Container.DataItem, "Team_Email")%></asp:Label><br />
</p>
</div>
</ItemTemplate>
</asp:Repeater>
I am using the new visual web developer 2008. If anyone knows why this is not working please let me know.
|
|
|
|
|
you have this line:
<asp:Image ID="image_role" ImageUrl="%#DataBinder.Eval(Container.DataItem, "Team_Name")%" runat="server" />
change it with this one and it should work:
<asp:Image ID="image_role" ImageUrl='<%#DataBinder.Eval(Container.DataItem, "Team_Name")%>' runat="server" />
you were using % instead of <% and " instead of '
-----
|
|
|
|
|
Can you double check my syntax on this? I keep getting an error of too many literals in the string
ScnQuestionNo and MeasID are number fields
<br />
string strInsert ="Insert INTO DataElements (Checked, Requirement, RequirementTitle," + <br />
" MeasID,DeNr, Duplicate, LiveQuestionNo, ScnQuestionNo, DataElement, Form, QType," +<br />
" Format, [Default], SME, [User], SA, IASME, Security, [Table], FieldName," + <br />
" TQScenario, TQLive, Subtitle, DA) Values (" + Convert.ToInt16(ckChecked.Checked) + ",'" + Requirement.Text + "','" +RequirementTitle.Text+ "'," + MeasID.Text + ",'" + DeNr.Text + "'," + Convert.ToInt16(ckDuplicate.Checked) + ",'" + LiveQuestionNo.Text + "'," + ScnQuestionNo.Text + ",'" + DataElement.Text + "','" + Form.SelectedValue + "','" + QType.SelectedValue + "','" + Format.Text + "','" + Default.Text + "'," + Convert.ToInt16(ckSME.Checked) + "," + Convert.ToInt16(ckUser.Checked) + "," + Convert.ToInt16(ckSA.Checked) + "," + Convert.ToInt16(ckIASME.Checked) + "," + Convert.ToInt16(ckSecurity.Checked) + ",'" + TableName.SelectedValue + "','" + FieldName.Text + "'," + Convert.ToInt16(ckTQScenario.Checked) + "," + Convert.ToInt16(ckTQLive.Checked) + ",'" + Subtitle.Text + "'," + Convert.ToInt16(ckDA.Checked) + ")";<br />
<br />
<br />
Here's my debug output:
strInsert: "Insert INTO DataElements (Checked, Requirement, RequirementTitle, MeasID,DeNr, Duplicate, LiveQuestionNo, ScnQuestionNo, DataElement, Form, QType, Format, [Default], SME, [User], SA, IASME, Security, [Table], FieldName, TQScenario, TQLive, Subtitle, DA) Values (0,'Unk','Unk',,'DE 0.1.17',0,'',,'Last four digits of SSN','Demographics','N/A','char','',0,0,0,0,0,'Demographics','LastFour',0,0,'N/A',0)"
Now I get "Line 1: Incorrect syntax near ','."
|
|
|
|
|
Whoah - that is one really insecure statement. Have you considered what this is going to do if you become the victim of a Sql Injection Attack[^]? Please reconsider before you go any further down this path.
|
|
|
|
|
I am on an Govt Secure server. That is not actually out on the web. I don't have to worry about a SQL Injection Attack. I am no skilled programmer, nor trained, this is the only way I know how to do what I am doing.
|
|
|
|
|
Ibuprofen wrote:
I am on an Govt Secure server. That is not actually out on the web. I don't have to worry about a SQL Injection Attack.
What? You think that public sector workers are all above reproach. SQL Injection attacks can occur ANYWHERE where the code is running unprotected. Take the advice given in the article and use it - it will make your code easier to use AND more secure. You won't have to worry about balancing apostrophes.
|
|
|
|
|
Anyone that uses my application, has a security clearance, you have to have access to our network, to get to the application, if any of the people cause a SQL Injection attack. Well then, that will end with a nice prison sentence. I am reading the article, and I will always take whatever help I can get, I am not a trained programmer, the article is a bit above my head.
|
|
|
|
|
Still no excuse for poor coding techniques. As Pete said, an attack can occur ANYWHERE. Do you want to handle it after the fact, if it is ever detected at all, or prevent it from happening in the first place?
only two letters away from being an asset
|
|
|
|
|
Ibuprofen wrote: Anyone that uses my application, has a security clearance
The vast majority of security breaches are inside jobs.
Ibuprofen wrote: if any of the people cause a SQL Injection attack. Well then, that will end with a nice prison sentence.
If they get caught!
Ibuprofen wrote: I am not a trained programmer, the article is a bit above my head
I wrote the article. If I can help you understand it then let me know what you'd like help with.
Upcoming FREE developer events:
* Developer! Developer! Developer! 6
* Developer Day Scotland
My website
|
|
|
|
|
Though I agree w/Pete O'Hanlon's comment and suggest you take what he says into consideration, maybe what I have highlighted in red is (are) the source(s) of your error...
Ibuprofen wrote: Values (0,'Unk','Unk',,'DE 0.1.17',0,'',,'Last four digits of
|
|
|
|
|
In additional to researching sql paramaters, you should look at StringBuilder[^]
only two letters away from being an asset
|
|
|
|
|
Is it possible to parametrize a generic collection by user controls (*.ascx)?
thx
|
|
|
|
|
Since user controls derive from System.Web.UI.UserControl, you can use this class to store them, like in a List<UserControl> .
|
|
|
|
|
hello
thanks for the time
I work in a company car and
i have to do a small page to calculate Available hours in the workshop
i have my data base and i have Researching how use
dataset datareader custom entity with objective to process the data
and Giving results
i read the article Dude, where's my business logic?
in my work all logic is in the store procedure
i will wish Implementing the business logic in the BUSINESS LAYER
GET the data and process this in the business layer.
doing the store procedure very simple
some one have a example o link
thanks for the time
regards,
|
|
|
|
|
Go to ASP.NET and look at the samples provided.
|
|
|
|
|
thanks for the comment
i am gointo see the example that asp.net provide
regards
|
|
|
|
|