|
first check if you are getting data in dread i.e datareader
then cast to string
Response.Write(dread["Firstname"].ToString());
|
|
|
|
|
i did try that and also checked with Console.Write(dread[0])
but when i tried with console... nuthing got printed.. though.. no error came..
also now how do i check whether dread has a value..
when i debugged.. it does follow the loop... though the VIsibleFiledCOUnt = 12
i guess that means it has data..
Kunal
|
|
|
|
|
Hey did u try by putting Break Points in your code.
Regards,
Satips.
|
|
|
|
|
Satips wrote: Hey did u try by putting Break Points in your code.
yeah!! thats how i performed my debugging... and got those values..
Kunal
|
|
|
|
|
Hello
I want to make that the users from my Website can visit they're Profile over the websiteurl/username. I have read, that i have got to use url rewriting (into Application_BeginRequest)to handle this. Now if I want to use it this way, there must exist a Folder with the username and a Default.aspx File into it. Otherwise it will never reach the global.asax File and i can't change the URL.
Do I really have to create this Folders and Files or can i add something into the IIS or so?
I thought also about the possibility to change the 404Error File into an .aspx File and handle it there. Is this the solution?
Best regards
succo
|
|
|
|
|
I am using Visual Studio .NET 2003 to develop the application. My issue is that i had to generate a Word Report with password from an ASP.NET web application.
After much try i got the dll Microsoft Word 11.0 Object Library and with the help of which while trying to generate a word document with password from a application it was throwing a runtime exception.I had to imersonate the user as it showed an acces violation.
COMException (0x800a175d): Could not open macro storage.
When performed a search with this, i came to know the necessity of configuring the Word application of the server with DCOMCNFG - as setting the word to be run under interactive user mode etc. But that is very risky as listed in the links,
http://support.microsoft.com/kb/q288366/ -- (Explains how to configure with DCOMCNFG)
http://support.microsoft.com/kb/257757/
Can any body tell me how to solve this without using DCOMCNFG ?
The following link tells me that it can also be achieved by saving the
document as XML and manipulating the XML.
http://www.thescripts.com/forum/thread374627.html
Is it possible to set a password while generating with the XMl... i don't think that it is possible but still....
Then how to stream that file to the client ?
If any body could give me any suggestions or links i'll be grateful...!
Your suggestions might be of great value....
If anybody comes across any link or any thing please do reply ....
I will be very grateful...
|
|
|
|
|
I don't think you can solve it without using dcom config. This is a bad plan of attack though. Having Office installed on your server is bad enough. Opening Office with the ASPNet worker process is even worse. You don't want to do that.
Your best bet for sending word document to the client is to use SQL Server Reporting Services or Crystal Reports and exporting the report to MS Word Format.
|
|
|
|
|
Thanks Todd. But is there any way to set the password for the word document when not using a server side object or when not configuring with 'DCOMCNFG'.
|
|
|
|
|
jsript validation ( date validation )
Can anyone help me ,I want Jscript validation .Please help me with some
code & description.
rahul_devgan80@yahoo.com
dipendra
|
|
|
|
|
One post is enough
only two letters away from being an asset
|
|
|
|
|
jsript validation ( date validation )
Can anyone help me ,I want Jscript validation .Please help me with some
code & description.
dipendra
|
|
|
|
|
How about being a little more specific? What are you trying to do? What have you tried? If you haven't tried anything, then do so before asking for help.
only two letters away from being an asset
|
|
|
|
|
if u r using ASP.net, why dont u use the validation controls in it.. just drag and drop one..
for input date, use calendar extender in AJAX, and a reqd field validator on the text box.. this will easily do the job.
Kunal
|
|
|
|
|
I write this code in webpart.aspx and add this file to my project:
<div >
<asp:WebPartManager ID="WebPartManager1" runat="server">
</asp:WebPartManager>
<table runat ="server" >
<tr >
<td>
<asp:WebPartZone ID="WebPartZone5" runat ="server" >
<ZoneTemplate >
<asp:Calendar ID="Calendar1" runat="server" Title="Time & Date" BackColor="White" BorderColor="#3366CC" BorderWidth="1px" CellPadding="1" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="#003399" Height="200px" Width="220px">
<TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
<SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
<OtherMonthDayStyle ForeColor="#999999" />
<TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" Font-Bold="True"
Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" />
<NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
<SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
<WeekendDayStyle BackColor="#CCCCFF" />
<DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
</asp:Calendar>
</ZoneTemplate>
</asp:WebPartZone></td> </div>
But this gives one problem at runtime i.e how to retain the webpart control, once closed by mistake? (at runtime).
I am not able to view the webpart once i closed it on runtime.
Another problem is that I am using vs2005 but I am not able to find webpartpagemenu control in web parts in toolbox
pls help
|
|
|
|
|
You need to add a catalog zone to your page. When switching the WebPartManager to catalog mode it will display and you can add any closed webparts back to the page.
There is no such thing as a webpartpagemenu control.
Do yourself a favor and do some research on the subject before trying to use it.
only two letters away from being an asset
|
|
|
|
|
Does anyone know if I can use Ajax with VS2003 & ASP.Net 1.1 ?
Thanks
|
|
|
|
|
AJAX is a programming technique, not a tool. It is independent of VS and ASP.NET and has been around for years.
only two letters away from being an asset
|
|
|
|
|
|
*This is my code
***********
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ds As New Data.DataSet
Dim obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet
Dim str As String = "select ProjectMember, Total_Hours from Timesheet"
Dim repeater1 As Repeater
Dim NumberOfBoxes As Integer
Dim WhichBox As Integer
NumberOfBoxes = Integer.Parse(WhichBox)
Dim rows(NumberOfBoxes) As Integer
For WhichBox = 0 To NumberOfBoxes
rows(WhichBox) = WhichBox
Next
repeater1.DataSource = rows
repeater1.DataBind()
Dim bLayer As New Businesslayer.GlobalFunctions
Dim reader As Data.SqlClient.SqlDataReader = bLayer.returnRecords(str)
For WhichBox = 0 To NumberOfBoxes
Dim cmbProjectName As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbProjectName"), DropDownList)
Dim cmbClientSite As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbClientSite"), DropDownList)
Dim cmbProjectManager As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbProjectManager"), DropDownList)
Dim cmbCategory As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbCategory"), DropDownList)
Dim cmbProjectMember As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbProjectMember"), DropDownList)
Dim cmbOccupation As DropDownList = CType(repeater1.Items(WhichBox).FindControl("cmbOccupation"), DropDownList)
Next
Session("Repeater1") = reader("Repeater")
Session("ProjectMember") = reader("ProjectMember")
Session("TotalHours") = reader("TotalHours")
GridView1.DataSource = ds
GridView1.DataBind()
End Sub
***********
*This is an error
**********
Object reference not set to an instance of an object
*****************
*I want the gridview to display selected values from the table
****************
please help me what might be the problem
oga m
|
|
|
|
|
|
Go here to learn how to program with data in ASP.Net.
|
|
|
|
|
*This is a error
************
Object reference not set to an instance of an object.
*******************
*This is my code,when you click button to enter the captured values from the controls in to the Table
**************
otected Sub ButtonSubMana_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonSubMana.Click
Dim ds1 As New Data.DataSet
Dim obj As Businesslayer.TimeSheet = New Businesslayer.TimeSheet
Dim NumberOfBoxes As Integer
Dim WhichBox As Integer
NumberOfBoxes = Integer.Parse(txtDay.Text)
Dim rows(NumberOfBoxes) As Integer
For WhichBox = 0 To NumberOfBoxes
Dim txtDate As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtDate"), TextBox)
Dim cmbProjectName As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectName"), DropDownList)
Dim cmbClientSite As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbClientSite"), DropDownList)
Dim cmbProjectManager As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectManager"), DropDownList)
Dim cmbProjectMember As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbProjectMember"), DropDownList)
Dim cmbCategory As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbCategory"), DropDownList)
Dim cmbOccupation As DropDownList = CType(Repeater1.Items(WhichBox).FindControl("cmbOccupation"), DropDownList)
Dim txtHours As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtHours"), TextBox)
Dim CheckBox1 As CheckBox = CType(Repeater1.Items(WhichBox).FindControl("CheckBox1"), CheckBox)
Dim txtDescription As TextBox = CType(Repeater1.Items(WhichBox).FindControl("txtDescription"), TextBox)
obj.addTimesheet(txtIDNumber.Text, cmbProjectName.SelectedItem.Text, cmbClientSite.SelectedItem.Text, cmbProjectManager.SelectedItem.Text, cmbProjectMember.SelectedItem.Text, cmbOccupation.SelectedItem.Text, txtDate.Text, Double.Parse(txtHours.Text), txtDescription.Text, CheckBox1.Checked, cmbCategory.SelectedItem.Text)
Next
MsgBox("Successfully add")
End Sub
End Class
******************
I have created parameters and declared variables of my control inside a class Timesheet
*******
Please help me with this code
oga m
|
|
|
|
|
What line is causing the exception? Have tried stepping through it with a debugger? It should be evident what is causing the object null exception if you did.
only two letters away from being an asset
|
|
|
|
|
*This line cause exception
*******************
obj.addTimesheet(txtIDNumber.Text, cmbProjectName.SelectedItem.Text, cmbClientSite.SelectedItem.Text, cmbProjectManager.SelectedItem.Text, cmbProjectMember.SelectedItem.Text, cmbOccupation.SelectedItem.Text, txtDate.Text, Double.Parse(txtHours.Text), txtDescription.Text, CheckBox1.Checked, cmbCategory.SelectedItem.Text)
oga m
|
|
|
|
|
Have tried stepping through it with a debugger? You should see which object is causing the exception and be able to figured it.
only two letters away from being an asset
|
|
|
|