|
I use this function to get logged calls of specified date when i use this function it works but i want to specify my date in DATEADD but it says invalid column.
Public Function GetLoggedCallsMember(ByVal CName As String, ByVal Intl As String) As Data.DataSet
Dim NowD As String = DateTime.Now.ToString("MM/dd/yyyy")
Dim s As Date = DateAdd(DateInterval.Day, 7, CDate(NowD))
Dim strSQL As String
Dim obj As Datalayer.Database = New Datalayer.Database
strSQL = "Select Who,Department,Priorities,Responds,Subject,DateSend,Last_Time_Updated from View_Calls where ToWho = '" & CName & "'and DateSend > DateAdd(Day, 10,'3/8/2007' )"
GetLoggedCallsMember = obj.GetDataSet(strSQL)
obj.Close()
Exit Function
End Function
nzibi
|
|
|
|
|
Hi All
I have a page in which Paging is true. It display different records. And if records are more the it display other records on another page like 1234. There is a search technique. When I click for search, Records are found but with the following Error. Also records are not displayed on Datagrid.
System.Web.HttpException: Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount
Any Help regarding this.
Thanks in Advance.
|
|
|
|
|
Hi
This error is displaying 'cos if you are in some other page (lets say 5th page). Then you are trying to search some other criteria. If there is no record then it should go to first page. PageCount always start from 0
So in Page Event in your code, set PageIndex = 0 before searching. Hope this solves your problem
Rate this message. Thank you. Harini
|
|
|
|
|
Thank u very much, But I get this error not all time but some time.
|
|
|
|
|
hello
can anybody have faced this problem How can i set IE proxy using c# with Asp.Net.
Thanx
Dotnet
|
|
|
|
|
Hi frinds this is my first post. I m working with Asp .net 2 and have a problem with adding a css to the server side controls of an aspx page .Please help me .
|
|
|
|
|
You can always use any stylesheet class (CSS class) using the attribute CssClass of any server side control.
But make sure the your aspx file is having a link to the .css file.
Link to the CSS file:
======================================
add the following line with your css file name.
<head runat="server">
<title>CSS practice</title>
<link rel="Stylesheet" href="yourCssFileName.css" />
</head>
Thanks,
Arindam D Tewary
|
|
|
|
|
Greetings techies!!!!
I am having a datagrid and a textbox seperate. I would like that when I click a certain datagrid row it must display an item of the specific row in a texbox.
I'm using C#.NEt
Kind Regards
Mpho
|
|
|
|
|
(1) write code in this grid event
Grdplace_RowDataBound---
e.Row.Attributes.Add("onclick", "SetValue('" & e.Row.Cells(0).Text.ToString & "')")
//e.Row.Cells(0)-- 0 denote the column value whateve you would like
(2) Write java script method...........
function SetValue(val)
{
document.getElementById('textboxid').value=val ;
}
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
hi all,
I am using RadChart.Net2 assembly.In that ,i am getting the bar chart in 2 dimensional.But i want the bar chart in three dimensional.
Please give me the reply how to get 3D bar chart
Thanks in advance....
|
|
|
|
|
Hi friends,
Please give me details reg garbage collection in .net and how the garbage collector knows the object is unused and to free it. Is we have to provide any code for GC to know about the unused objects. Its asked in my interview.
Expecting help.
Thanks in Advance,
Regards,
Prya
|
|
|
|
|
|
Hi All,
I have to do one task. First i need to copy files from vss and run bat files.i have a document with all steps.
step 1: we have to take files from vss by using getlatestversion option and copy it to some where in local.
step2: In Dos command prompt i have to run 2 .bat files
i have done step1 but when i run bat file i am getting Error like this
The selected file is not a valid visual studio solution file " The following files specified on the command line : devenv.exe could not be found and will not be loaded
could you pls tell me what is the problem here.
Thanks to All Repliers.
|
|
|
|
|
Hi all,
I want to send a meeting request in outlook with an attachment.How can i send it from code.Also if possible i want to disable the deny button in the request. How can i achieve it???
Thanks in adv
|
|
|
|
|
hi all
give me a code please
--if password is entered incorrectly 3 times then lock the username and display a warnong message "account has been locked,please contact the system administrator."
give me a code please.
Gayatri
Gayatri
|
|
|
|
|
if(password is right)
---your code comes here---
if(password is wrong)
----increment a variable like 'attempts' by 1 ---initialize to zero at the begining itself
---if(attempts>3)
account locked
wrong username and pwd entered.
Gautham
|
|
|
|
|
Hello,
I created 2 GridViews, A and B. I created 2 datasets from Asp.Net 2.0 profile data.
Each GridView has a Bound Field and a Button Field.
When a button on GridView A is clicked the following should happen:
1. Copy the Row to GridView B
2. Delete the Row from GridView A
Finally, I have a button which would get the data from GridView A and GridView B.
What is the best way to create this?
And is GridView the best way to do this?
Thanks,
Miguel
|
|
|
|
|
I am not sure if its possible without javascript to handle at client side.
GrdiView is a server control it means you have to play with database. Best way to me is create tables in databae and then play with data. and delete or copy in between tables or use XML files whatever appeals you.
Also you can use Ajax updatepanel so it will look like that its not communicating with server or refresing pages at client side.
Personally I'll not suggest you to use ajax while doing these operartions untill unless you are happy with the operations.
Naveed Kamboh
Complexity kills, Write easy code for your self.
isolutionteam
|
|
|
|
|
Hi!
We are about to start a project that includes building a rather advanced ASP.NET user-interface. The somewhat unusual thing is that all components will be web parts, and we will host the app in WSS 3.0.
To get a head-start, we will use one of the commercial ASP.NET component libraries that are out there. We haven't nailed down all the detailed requirements, but we our main needs is powerful tree and grid-controls. Ajax support is a must.
Just browsing through the latest MSDN Magazine shows me several options:
* NetAdvantage by Infragistics
* SyncFusion
* Web.UI by ComponentArt
* Studio Enterprise by ComponentOne
* PowerWeb by Dart
* RAD Controls by Telerik
and I'm sure there are more. It will be time-consuming to assess all the options, so I'm asking you for help here. If you have had any experience working with any of the above or other ASP.NET UI component suites, please give me your feedback.
Some of the aspects I'm looking for are:
* Feature richness
* Feasibility for use in WSS web-parts
* Ease-of-use for the developer
* Documentation
* Access to source code
* Support, bugfixes
* Community support
* Intellectual property rights management (e.g. who owns the code if modified, etc)
Thanks a lot!
/Fredrik
|
|
|
|
|
I have created a user control for a common section of my project. The control contains 3 drop down lists. Each drop down list triggers the visibility and content of the next. This is quite a common technique used around the web and it works great for this issue of product selection.
Originally, when the functionality was built seperately into the pages, the final drop down list was used to confirm the selection and perform an action. On one page this was to Response.Redirect to another page, passing the selection in a query string. On another page this alters the visibility of the containing panel and shows the next step in another panel. Therfore the function performed when the final drop down box is selected can differ between pages.
My issue is how do I create the control in such a way that when the final drop down is selected the control triggers some sort of event that I can use in the page. I would then obviously use the result from the control on different ways from within the page.
Hopefully I have made it clear what I seek to achieve. Thanks in advance
|
|
|
|
|
The answer is in your question.
The solution to creating some kind of event is simply to create an event.
public event EventHandler Complete;
Now you have an event that you can use just like any control uses events.
The page can register for the event by adding a handler:
InstanceOfUserControl.Complete += new EventHandler(InstanceOfUserControl_Complete);
The Event handler looks like any standard event handler:
Public void InstanceOfUserControl_Complete(object sender, EventArgs e) {<br />
}
Your user control just calls the event handler when it wants to alert the page of the event:
Complete(this, EventArgs.Empty);
---
single minded; short sighted; long gone;
|
|
|
|
|
Hey thanks for the response. Once i got started it turned out to be even easier than this. I simply added an event which passed all three drop down lists.
Public Event SelectionComplete(ByVal Type As DropDownList, ByVal Use As DropDownList, ByVal Purpose As DropDownList)
Raised the event where it was needed in the code
RaiseEvent SelectionComplete(SelectionDropDown, SelectUseDropDown, SelectPurposeDropDown)
And then used the Declarations drop down from inside vs 2005 to select my new event. VS built the code for the handler in the page and all that was left to do was put the redirecting code in using the drop down values.
Thanks
|
|
|
|
|
im doing a samle project that i want to include in my project..
here is the sample code...
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Import Namespace=System.Web.HttpException %>
<title>Northwind Database Login
Sub doInsert(Source as Object, E as EventArgs)
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("C:\Documents and Settings\Joy.PHOENIX-1D0486C\Desktop\userId.mdb") & ";"
Dim MySQL as string = "Insert into Members (uid, pwd, fullname, email) " & _
"Values (@uid, @pwd, @fullname, @email)"
Dim MyConn As New Data.OleDb.OleDbConnection(strConn)
Dim Cmd As New Data.OleDb.OleDbCommand(MySQL, MyConn)
With Cmd.Parameters
.Add(New Data.OleDb.OleDbParameter("@uid", frmuid.Text))
.Add(New Data.OleDb.OleDbParameter("@pwd", frmpwd.Text))
.Add(New Data.OleDb.OleDbParameter("@fullname", frmfullname.Text))
.Add(New Data.OleDb.OleDbParameter("@email", frmemail.Text))
End With
MyConn.Open()
cmd.ExecuteNonQuery()
MyConn.Close
'Put a label on your page to contain the 'success' response:
lblMessage.Text = "Thank you for signing up. An email will be sent to you shortly." & _
"Your response will be needed from that email to activate your account"
End Sub
uid | <asp:textbox id="frmuid" runat="server"> | pwd | <asp:textbox id="frmpwd" runat="server"> | fullname | <asp:textbox id="frmfullname" runat="server"> | email | <asp:textbox id="frmemail" runat="server"> | <asp:button
id="button1"
="" onclick="doInsert" text="Submit" runat="server">
|
<asp:label id="lblMessage" runat="server" width="288px" forecolor="#C00000" font-size="Medium"
="" font-italic="True" font-bold="True">
--this code is like a Simple Log in and insert the data in the database.. a made already a blank database..but when i run it this is the error i've got
-System.web.HtppException-{"'(URL HERE or Data Path)\userId.mdb' is not a valid virtual path."}
-would someone describe what is the meaning of this error and what would be the solution or whatever?
_Thanks for helping
|
|
|
|
|
You are using a physical address in the call to Server.MapPath. This is not possible, as Server.MapPath is used to turn a virtual path into a physical path, so it expects a virtual path.
Just remove the call to Server.MapPath, as you already have a physical path.
---
single minded; short sighted; long gone;
|
|
|
|
|
It looks like some sort of issue with the path to the Access database that you are using. As far as I'm aware the Server.MapPath works on the same file structure as your web pages would. Eg ../database/userId.mdb instead of C:\Documents and Settings\Joy.PHOENIX-1D0486C\Desktop\userId.mdb . So put your database either in the root of your site or in a folder, named database, within the root like I have in my example path.
|
|
|
|