|
This might give you some ideas. http://www.codeproject.com/useritems/Searcharoo_3.asp[^]
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
:|I want to disable the back button of my browser so that the tlast visited pages are not revisited
Navneet Hegde
Program 2 Develop and Develop 2 Program
|
|
|
|
|
Following is the code:
<script language="JavaScript"><!--
document.onkeydown = mykeyhandler;
function mykeyhandler() {
if (window.event && window.event.keyCode == 8) {
// try to cancel the backspace
window.event.cancelBubble = true;
window.event.returnValue = false;
return false;
}
}
//--></script>
Hope it will help u...
|
|
|
|
|
Dear I think this will cancel my backspace Keyboard event
But i want that Back button on the Browser to get disabled and that user cant revisit the previous page .As I am on my last page and backward navigation not to take place
Navneet Hegde
Program2Develop and Develop2Program
|
|
|
|
|
Hi,
I'm presently using asp:datagrid control for displaying some data from a table.
But I don't want to continue with this process. I want to have complete control
over the process, like in J2EE where I can populate my result-set and display
what I want, where I want and however I want.
What I mean is: Let's say my table has four columns, and I make four corresponding
variables ASP.NET C#. Now, in a loopy fashion, I want to iterate through my
table as long as there are more rows to be fetched, and each cycle of the loop should
change the values of those C# variables.
(J2EE guys, remember this? -->
while (rs.neext())
{
do_something_baby;
}
I want this in ASP.NET C#.
Sounds archaic? I know, but it's totally fat free, unlike the asp datagrid control.
Any help anyone?
Thanks
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
Bulky Fellow wrote: I want to iterate through my
table as long as there are more rows to be fetched
In your database command object use ExecuteReader()
while(reader.Read())
{
}
|
|
|
|
|
If you want something more lightweight than datagrid you can use the Repeater control. Then for output control, use OnItemDataBound, which will give you control over the data output and let you add controls and specify attributes on the fly as well.
|
|
|
|
|
i want to design a feedback form n which i have kept a multiline textbox for putting comments of the user and then hit the submit button to submit the comment into the database. but when i want to retrive those comments from the database & view them in a grid,i just got the continious lines of data...my requirement is i want to view the data in that manner and style in which i have enterd it during the submission process with the same style and manner...can anybody help me in this regard how to do it or can give me any link regarding this..(like paragraph,heading...etc..)
thanks in advance..
pradip kishore
|
|
|
|
|
When you take data from the database you vil have to replace linefeeds with a html br-tag.
c#:
string Text = TextFromDatabase.Replce("\n", "<br />");
Response.Write(Text);
vb.net:
Dim Text As String = TextFromDatabase.Replace(VbCrLf, "<br />")
Response.Write(Text)
-- modified at 15:19 Monday 15th January, 2007
---------------
http://serverside.no
|
|
|
|
|
Hi All,
I am using GridView to display the Data.My problem is that I get the values from DB as ID,Name,Rights(eg:AXXVP;where A-ADD,X-Not allowed,V-View,P-Print).Now I have to put rights in diferent columns named Add Modify delete View and Print,these columns are checkbox and it is checked or unchecked depending upon values Rights column from DB.
Eg:Suppose I get row from DB as 1 User AXXVP
then Gridview will have
ID Name Add Modify Delete View Print
1 User checked unchecked unchecked checked checked
Since X denoted Unchecked.
Please Help.Thanks in Advance...
|
|
|
|
|
Hi,
Try this,
Call procedure CheckBoxListValues() on CheckBoxList's OnDataBinding event to show check/uncheck checkbox
Your aspx code....
<aspatagrid id="dg" runat="server" AutoGenerateColumns="False">
<COLUMNS>
<asp:templatecolumn HeaderText="Behörighet">
<ITEMTEMPLATE>
<asp:checkboxlist id="Checkboxlist2" runat="server" Width="544px" DataTextField="Name" DataValueField="ValueField"
RepeatDirection="Vertical" OnDataBinding="CheckBoxListValues">
<asp:ListItem Value="Add" Selected="True">Add</asp:ListItem>
<asp:ListItem Value="Modify">Modify</asp:ListItem>
<asp:ListItem Value="Delete">Delete</asp:ListItem>
<asp:ListItem Value="View">View</asp:ListItem>
<asp:ListItem Value="Print">Print</asp:ListItem>
</asp:checkboxlist>
</ITEMTEMPLATE>
</asp:templatecolumn>
</COLUMNS>
/aspatagrid>
and code behind code is ....
Public Sub CheckBoxListValues(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Checkboxlist2.DataBinding
Dim i As Integer
Dim str As String = "AXXVP" 'Pass value from Database
For i = 0 To Checkboxlist2.Items.Count - 1
Select Case i
Case 0 ' Add
If str.Substring(i, 1) = "A" Then
Checkboxlist2.Items(i).Selected = True
Else
Checkboxlist2.Items(i).Selected = False
End If
Case 1 'Modify
If str.Substring(i, 1) = "M" Then
Checkboxlist2.Items(i).Selected = True
Else
Checkboxlist2.Items(i).Selected = False
End If
Case 2 ' Delete
If str.Substring(i, 1) = "D" Then
Checkboxlist2.Items(i).Selected = True
Else
Checkboxlist2.Items(i).Selected = False
End If
Case 3 'View
If str.Substring(i, 1) = "V" Then
Checkboxlist2.Items(i).Selected = True
Else
Checkboxlist2.Items(i).Selected = False
End If
Case 4 ' Print
If str.Substring(i, 1) = "P" Then
Checkboxlist2.Items(i).Selected = True
Else
Checkboxlist2.Items(i).Selected = False
End If
End Select
Next
End Sub
Hope this will help..
Trishul
|
|
|
|
|
Thanks for the reply.I got how to do this.Now I need to save the Gridview Values on Save Button Click.
Thanks in Advance...
|
|
|
|
|
Hi,
I have an application used by customers for sending in warranty-claims.
This is solved by a wizard in 8 steps. On the final step I need to write all the data to a database so our warranty-administration application can process the information.
The problem is when the customer is clicking the Finish-button and then clicks it again.
It seems as if the Finishbuttonclick-method doesn't have time to really finish and begins again which results in more than one entry in the administration application.
I need to find a way to disable the Finish-button when the users clicks on it so I have time to finish my db operations.
How do I begin to solve this? I need some sort of script but how do I access the Finishbutton so I can disable it?
Very thankful for any help or suggestions!
/Dennis
|
|
|
|
|
Disable it by client side javascript function or by server side function
Best Regards
3ala2
|
|
|
|
|
Thank you for your reply.
I realise that this is the way to do it but how do I access the finishbutton so I can disable it?
Best regards
Dennis
|
|
|
|
|
i'm not sure
but this should be put in the finish event someting like
<br />
Dim btn as button = Page.FindControl("FinishButtonId")<br />
btn.Enabled = False<br />
Hope this would help
Best Regards
3ala2
|
|
|
|
|
Hi,
I've done this code in c# in asp.net 1.x. same thing i want to do in asp.net 2.0 in vb.net.
im getting an error in vb.net .
dsGrd = (dsGrd) Session["GridDataSet"];
how do i type cast the same to vb.net.my code in vb was,
dsorders = CType(Session("GridDataSet"), dsorders) and error was the bolded dsorders type was not defined.can somebody help me.
Regards,
Tasnim.
|
|
|
|
|
Do you have a strongly typed dsorders dataset in your project?
|
|
|
|
|
yes i do.dsorders is an xsd schema.
|
|
|
|
|
if my website have 100 pages and i want that 25 aspx pages be displayed when he is logged in.How can i achieve this with web.config file?
Mohinder Singh
|
|
|
|
|
I'm not sure if I understand what your problem is....
---------------
http://serverside.no
|
|
|
|
|
Hi,
I have created a new virtual directory and my validation controls are not working. My virtual directory is H:\ABC and My project lies in H:\ABC\MyProject.
Where i have to add WebUIValidation.JS File. I tried putting in ABC folder as well as MyProject But still not working. Do i have to configure anything. My IIS has a separate site for this virtual directly. This does not lie in Default web site. Pleaes help me out.
Ramya
|
|
|
|
|
I would like to put ASP software on my server, but I have heard that it has security issues. is this true
|
|
|
|
|
What ASP software do you mean? Do you mean the IIS web server that supports ASP, or some application developed using ASP?
What kind of security issues are you talking about?
---
Year happy = new Year(2007);
|
|
|
|
|
IIS web server that supports ASP
|
|
|
|