|
how to pass hour and minutes in crystalreport in asp.net with vb.net
|
|
|
|
|
Hello,
I add a table to my webform (3 rows,3 columns). In each one of the cells, I am inserting a button.
I would like to hide the table in run-time and then the 9 buttons will be hidded.
Is it possible?
Eric H.
|
|
|
|
|
yes you can use javascript code to show and hide the html table using style.display = 'none' .
Best Regards,
Apurva Kaushal
|
|
|
|
|
How i am doing this from codebehind.
I have to do it when I am clicking on a button(control server).
(I gave an ID=Table1 to my table).
Eric H.
|
|
|
|
|
Why you want to do it on server side if you can do the same on client side using javascript?
Best Regards,
Apurva Kaushal
|
|
|
|
|
because I am doing a lot of other operations in addition of hiding the 9 buttons.
Eric H.
|
|
|
|
|
In that case you can just make that html table a server side control and then you can hide it using visible = false;
Best Regards,
Apurva Kaushal
|
|
|
|
|
I though about this solution, may it cause some problems?
If not this is the best solution for my case.
Thanx
Eric H.
|
|
|
|
|
This will not cause any problem only thing is there will be a round trip to the server which should be avoided if not required.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
Can anybody send me a tutorial on how to handle a dynamic dropdownlist in vb asp.net. What I want is to have 2 dropdownlist. In my first dropdownlist, I have the list of departments. Then in my second dropdown list, I have the list of the members of each department. So if I select Human Resource in my first drop down list, members from HR team in my second dropdown list will be enumerated and so on with other department.
I really appreciate your help. Thanks in advance.
|
|
|
|
|
What you need to do is first fill the first dropdownlist(department) at the page load event and then on the SelectedIndexChanged fill the second dropdownlist(members) by getting the filtered records(members only associated with selected department).
Best Regards,
Apurva Kaushal
|
|
|
|
|
Thank you very much but can you show me how? Because Im a newbie with this thing. I really appreciate it. Thanks in advance.
|
|
|
|
|
If you know how to fill a dropdown list then at load event you assign the datasource(for this first you have to get the data from database) and then call the databind method. Secondly on the selectedindex change event of the first dropdown list bind the second dropdownlist(getting the corresponding data from the database).
To fill the second dropdownlist you have to pass the selected items ID(i.e. departments ID) in order to get the correct set of records.
If you still have the problem can you give the case in which exactly you are having the problem?
Best Regards,
Apurva Kaushal
|
|
|
|
|
I M not Getting ur point plz send me appropriat code ..
|
|
|
|
|
Do you want the code to bind the dropdownlist control, if so the here[^] you can get that.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi.. yes I already filled up a dropdown list coming from SQL data as my datasource. But I dont know how to code the second part that you are saying.
"Secondly on the selectedindex change event of the first dropdown list bind the second dropdownlist(getting the corresponding data from the database).
To fill the second dropdownlist you have to pass the selected items ID(i.e. departments ID) in order to get the correct set of records."
Can you show me in vb.net code? I really appreciate it. Thanks.
|
|
|
|
|
What you need to do in the second part is you have to get the ID value of the item selected in the department dropdownlist(when you would have bind the first dropdownlist then you would have assigned the text and value field, you need to get that value of the selected item). And once you are having that you can query to get the records associated with that department ID. And once you get the desired records you have to bind the second dropdown exactly like you have done with the first one. I think now it would have been clear.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi all,
In my Asp .net Application.. I need to store the date in a variable.. For that i wrote the following code
Dim thisDate, startDate, endDate As Date
Dim thisMonth, thisYear As Integer
thisDate = Now.Date
thisMonth = Month(thisDate)
thisYear = Year(thisDate)
If thisMonth = 1 Or 3 Or 5 Or 7 Or 8 Or 10 Or 12 Then
startDate = "1/thisMonth/thisYear"
endDate = "31/thisMonth/thisYear"
ElseIf thisMonth = 4 Or 6 Or 9 Or 11 Then
startDate = "1/thisMonth/thisYear"
endDate = "30/thisMonth/thisYear"
Else
startDate = "1/thisMonth/thisYear"
endDate = "28/thisMonth/thisYear"
End If
But it shows the error message as,
Cast from string "1/thisMonth/thisYear" to type 'Date' is not valid.
Please help me in this issue..
-- modified at 0:01 Tuesday 21st November, 2006
|
|
|
|
|
JVVS wrote: If thisMonth = 1 Or 3 Or 5 Or 7 Or 8 Or 10 Or 12 Then
The Or operator doesn't work that way. You can't use it to compare one value to several values. You have to make each operand a complete condition.
JVVS wrote: startDate = "1/thisMonth/thisYear"
You can't use a variable inside a string. You have to concatenate the string values.
Why are you trying to create a string to be converted to a date? Use the constructor of the DateTime structure that takes year, month and day.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa wrote: JVVS wrote:
If thisMonth = 1 Or 3 Or 5 Or 7 Or 8 Or 10 Or 12 Then
How can i check without or operator..
|
|
|
|
|
You don't have to do it without the or operator, you only have to use it correctly:
If thisMonth = 1 Or thisMonth = 3 Or thisMonth = 5 Or thisMonth = 7 Or thisMonth = 8 Or thisMonth = 10 Or thisMonth = 12 Then
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Can we access html controls created through javascript in ASP.NET code behind ?
var arrInput = new Array(0);
var arrInputValue = new Array(0);
function addInput() {
//arrInput.push(createInput(arrInput.length));
arrInput.push(arrInput.length);
//arrInputValue.push(arrInputValue.length);
arrInputValue.push("");
display();
}
function display() {
document.getElementById('parah').innerHTML="";
for (intI=0;intI<arrInput.length;intI++) {
document.getElementById('parah').innerHTML+=createInput(arrInput[intI], arrInputValue[intI]);
}
}
function saveValue(intId,strValue) {
arrInputValue[intId]=strValue;
}
function createInput(id,value) {
//alert(id);
return "<input type='text' id='test "+ id +"' onChange='javascript:saveValue("+ id +",this.value)' value='"+ value +"'><br>";
//alert(test);
}
function deleteInput() {
if (arrInput.length > 0) {
arrInput.pop();
arrInputValue.pop();
}
display();
}
Dynamic creation of input boxes
Add more input field(s)
Remove field(s)
<asp:button id="MySubmit" runat="server" text="submit">
Can i access the controls data in codebehind ? i dont see it getting enumerated in the Controls collection ?
foreach (Control c in Controls)
Response.Write(c.ClientID.ToString() + c.GetType().ToString() + " ");
Rajaraman Soundararajan
|
|
|
|
|
I have an ASP page that is the basic 'home' location (called user_area.asp) for all of my clients who log into my website. In the user_area.asp page, it calls for some common elements with an #INCLUDE FILE statement that are standard and not variable. (Such as 'header_inc.asp' and 'footer_inc.asp')
If I have a field in my Cutsomer Data Base (.mdb) called 'Custom2' and that field would contain a URL to something like:
mysite.com / clients / clientname / client.asp
What I would need to do is be able to use the #INCLUDE FILE statement to call for the 'Custom2' field so that I could include the clients 'client.asp' within the 'user_area.asp' page.
This 'Custom2' variable in my database would change accrdingly to whomever logged into the system. Since none of the clients have the same exact download files, the 'Custom2' variable would always change and the #INCLUDE FILE statement would always point and display a seperate client.asp page withing the user_area.asp page.
Thoughts? Resolution?
Code below...
========================================================================
<%@ LANGUAGE="VBSCRIPT" %>
<% LOGIN_PAGE = "Yes" %>
<!--#INCLUDE FILE="call_check_user_inc.asp"-->
<html>
<head>
<title><% =App_Name %></title>
<script src="../../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<BODY <%=BodyTag%>>
<!--#INCLUDE FILE="header_inc.asp"-->
<%
User_ID = Session("User_ID")
%>
<div align="center"><center>
<table width="650" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><font face="Arial"><font size="2"><br>
</font>
</font>
<div align="center">
<table border="0" cellpadding="0" bgcolor="#C0C0C0" cellspacing="0" width="500">
<tr>
<td colspan="3" bgcolor="#ECECE6">
<p align="center"><font face="Arial" size="1"> </font><font face="Arial" size="3"><b><% =Session("Company_Name") %>
User Area </b></font> </td>
</tr>
<tr>
<td colspan="3" bgcolor="#FFFFFF"><font face="Arial"><font size="2">Thank you for signing in
<% =Session("First_Name") %>,</font><br>
<br>
<font size="2">
You can edit your account info from this screen. </font></td>
</tr>
<tr>
<td width="77" bgcolor="#FFFFFF"> </td>
<td width="393" bgcolor="#FFFFFF"><font size="-1"><a href="edit.asp"><font face="Geneva, Arial, Helvetica, sans-serif">Edit Account Info </font></a></font></td>
<td width="30" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"><font size="-1"><font face="Geneva, Arial, Helvetica, sans-serif"><a href="<% Response.Write(Session("Custom1")) %>">Downloads</a></font></font></td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</center></div>
<br>
<br>
<!--#INCLUDE FILE="footer_inc.asp"-->
</body>
</html>
Dave Steele
|
|
|
|
|
I'm building a web accounting application in ASP.NET 2.0 using VS 2005 and SQL Express. I already developed a VB6 accounting app but re-developing in ASP.NET 2.0 is a bit difficult.
My problem is in making the form/web page look very much like the actual business form, say a sales invoice. In VB6 I could use the DBGrid control to add data but in ASP.NET 2.0 the GridView can only edit, select or delete. How to Create an Invoice-like Form in ASP NET 2.0 ?
I am at the moment trying to use a FormView for the invoice header so that I can rearrange the textboxes so that it looks like an invoice header (eg. invoice number, date on the right top edge, address on the left top edge, etc)
For the line item details (Stock Code, Description, Qty, Price and Amount) I put another FormView with a row of text boxes and an Insert link at the end and then a GridView just below it so that the columns are aligned with the input text boxes above. When users enter the input in the one-row text boxes above the grid, they can inserted into the grid row by row and the text boxes become blank again to accept new input.
I have tried to use the DetailView control to make my programming easier but I find no way to convert it into one single row rather than what it is now (1 column, a new rows for each field).
Anybody knows of a better way ?
Ezani
|
|
|
|
|
I am trying to understand how to send HTML emails to the users. The content of the emails can vary according to the users, e.g.:
Dear [CustomerName]
Thanks for your orders. Your order number is [OrderNumber].....
How can I create / manage email content such as above.
I am also interested to know how does Amazon create their emails. Because the whole content of their emails is tailored for each individual customer.
Thanks
|
|
|
|