|
I really need to know how to put the output of an aspx file into a pdf
thx
BiG RaLpH
|
|
|
|
|
guys plz tell me
plz tell me is windows vista home supports .NET Freameowork 1.1, 2.0 & 3.0 ?
Ramana
|
|
|
|
|
|
SQL Server 2000 database 'bit' type problem.
---------------------------------------------
I haven't given any initial value of that field in design time
For Ex. The current value of 'Active' field is : 0
Now, I'm fire a update query of other fields except 'Active' field.
But, this query update the value of 'Active' field with 1.
Means, I haven't use this 'Active' field in my Query.
My Query is : update tblProduct set Name = 'xxxx' where ProductID = 1
but, After fire this query, My 'Active' fields value become 1, while it was 0.
So, This is my problem.
Hope you will get this now.
Please, Help me as soon as possible.
Thanks.
-- modified at 1:41 Friday 14th September, 2007
Regards,
Abhi
|
|
|
|
|
Just check if there are any triggers defined for that table that set the value to be 1
|
|
|
|
|
like in MSN Messenger , i can logon as a yahoo member or as a rediff member , etc,
so the Web-sites that follow the Passport authentication have the common database of yahoo messenger or rediff messenger ??????
i mean msn messenger use the yahoo and rediff database in order to validate the valid discrete mail id's ?
i mean to say the msn messenger does not have the unique id like yahoo have(yahoo.com) or that one rediff has (rediff.com)
while subscribing at the msn messenger i can subscribe using the yahoo id or the rediff id.
i have an another example , the site name ORKUT.com
Soniagupta1@yahoo.co.in
|
|
|
|
|
Sonia Gupta wrote: while subscribing at the msn messenger i can subscribe using the yahoo id or the rediff id.
i have an another example , the site name ORKUT.com
What is your problem. ? Are you trying to tell us what is happening in yahoo/MSN/rediff ? And what is this question to do with ASP.NET ?
Sonia Gupta wrote: like in MSN Messenger , i can logon as a yahoo member or as a rediff member
Sonia Gupta wrote: so the Web-sites that follow the Passport authentication have the common database of yahoo messenger or rediff messenger ??????
Passport authentication is specific for Microsoft. Sites using passport authentication uses the same database to get authenticated. But this doesn't mean that yahoo rediff using the same database. I don't think that you can login into MSN messenger using your yahoo/rediff id.
|
|
|
|
|
hey out there, this is driving me nuts!
i'm trying to transfer a number of 'DataKeys' from one page to a second page. i can get the values to come across using 'Server.Transfer' but when a button on the receiving page is clicked (causing a postback), the url changes and i lose the values.
how do i keep them?! it's a simple 'post page ones values to page two, perform a search on page two by clicking a button, select an option and go back to the 1st page' kinda thing.
on my initial page i've a gridview:
<asp:GridView ID="GridView1" runat="server" OnRowCommand="GridView1_onRowCommand" DataKeyNames="UserID,FirstName" AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="userid" HeaderText="userid" />
<asp:BoundField DataField="firstname" HeaderText="firstname" />
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="btnSearchPage" runat="server" Text="Button" CommandName="gotoSearchPage" CommandArgument='<%# Container.DataItemIndex %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
and this is my 'OnRowCommand' command:
Protected Sub GridView1_onRowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs)<br />
<br />
'grab the row info<br />
Dim strCmdName As String = e.CommandName.ToString<br />
Dim intDataItemIndex As String = e.CommandArgument.ToString<br />
<br />
'get the row details<br />
Context.Items("UserID") = GridView1.DataKeys(intDataItemIndex).Item("UserID")<br />
Context.Items("FirstName") = GridView1.DataKeys(intDataItemIndex).Item("FirstName")<br />
<br />
If (strCmdName = "gotoSearchPage") Then<br />
<br />
Server.Transfer("~/searchPage.aspx", True)<br />
<br />
End If<br />
<br />
End Sub
on my receiving page 'searchPage.aspx' i can get the DataKeys using this in the page init:
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init<br />
<br />
If (Not IsPostBack) Then<br />
<br />
intFacilityID = Context.Items("FacilityID")<br />
<br />
End If<br />
<br />
End Sub
but the moment i click the search button, the url changes and hey presto - no more data keys?!
this must be possible?!
any suggestions would be great,
cheers,
jake
|
|
|
|
|
i have the path of a file in a string variable. i am reading that using the following code
new FileStream(path, FileMode.Open, FileAccess.Read);
it's working fine when i execute from local machine .when i upload it into server it is showing the error 'Could not find a part of the file..
Any one can help me.........
Anu
|
|
|
|
|
try this code
new FileStream(Server.MapPath(path), FileMode.Open, FileAccess.Read);
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
Then it'is coming like this
'D:\Anu\Pic1.bmp' is not a valid virtual path.
|
|
|
|
|
You can't read a file that doesn't exist.
Put the file that you want to read on the server. Put the virtual path to the file in the path variable, and use Server.MapPath(path) to get the physical path to the file.
---
single minded; short sighted; long gone;
|
|
|
|
|
i didn't understand.can you give me a sample code?..
|
|
|
|
|
How can i put the file into the server using path. if i am using file upload control then i can use fileuploadcontrolname.postedfile.saveas(server.mapath(filename)).but i am not using that control.i am only have the path of the file in a string variable...How can i do.......
Anu
|
|
|
|
|
You can't do that directly SO you want to read the Uploaded file
then use fileuploadID.PostedFile.InputStream as input to Stream reader and read the file
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
anujose wrote: i didn't understand.can you give me a sample code?..
The example code will be exactly as Pathan showed:
new FileStream(Server.MapPath(path), FileMode.Open, FileAccess.Read);
The path in the path variable should be a virtual path, like for example "/SomeFolder/SomeFile.txt" .
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa was right and I just submit his answer with simple code
FileInfo fInfo = new FileInfo(fudoc.Value.ToString());
fudoc.PostedFile.SaveAs(Server.MapPath("~/UplDoc/") + fInfo.Name);
after this read file from Folder UplDoc
FileInfo fi = new FileInfo(Server.MapPath("~/UplDoc/filename.extension"));
Hope it helped
I Love SQL
|
|
|
|
|
i think no need to save also give one of the steamreader parameter as uploadfileCntrolID.Postedfile.InputStream
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
It was my quick answer
Addition in my previous post: After the job is done with file then file can be deleted
FileInfo fdelete = new FileInfo(Server.MapPath("~/UplDoc/filename.extension"));<br />
fdelete.Delete();
I Love SQL
|
|
|
|
|
Hi All!
in my application, there is a table tblCountries(countryId,countryName) & i have a class: person
public class Person
{
private string name;
private int countryID;
public string Name
{
get {return this.name;}
set {this.name = value;}
}
public string CountryId
{
get {return this.countryID;}
set {this.countryID= value;}
}
}
now i want to add an property CountryName which returns name of the country name rather than country . can any one help me in this regards?
|
|
|
|
|
Smells like homework, but...
Check out DataTable.Select.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I have a transaction that adds sql statements between postbacks that occur at specific button clicks. And the transaction is finally commited at another button click.
Each time the postback occurs the sql commands are added to the transaction without any problem but finally when i commit it, an exception occurs that says:
"This SqlTransaction is completed; it is no longer usable."
When I viewed the property of the transaction object while debugging I ve noticed a Timeout property that has the value 15. I dont know whether it is in seconds or minutes. I think it is due to the timeout the transaction is gettting completed.
I have declared the transaction globally in my page say "MemberLinking.aspx" as:
<br />
Private Shared myTrans As SqlTransaction<br />
I have then passed the transaction to a function defined in a class file like this:
<br />
Public Sub BeginTransaction(ByRef tsql As SqlTransaction)<br />
Try<br />
tsql = conn.BeginTransaction()<br />
Catch ex As Exception<br />
Finally<br />
End Try<br />
End Sub<br />
This function begins the transaction. The other functions that adds the commands to the transaction are also passed the transaction as parameter. Vut it is done by value.
I have added the sql statements to the transaction as:
<br />
sqlstatement = "UPDATE UserFamily SET UserID=" & LinkedUID & " WHERE UserID=" & UID & " AND FamilyID=" & FID<br />
cmd = ReturnSqlCommand(sqlstatement)<br />
cmd.Transaction = Mytrans<br />
cmd.ExecuteNonQuery()<br />
<br />
sqlstatement = "INSERT INTO UserFamily(UserID,FamilyID,Accepted,IsModerator) VALUES (" & ChildID & "," & FamilyID & _<br />
",1,0)"<br />
cmd = ReturnSqlCommand(sqlstatement)<br />
cmd.Transaction = Mytrans<br />
cmd.ExecuteNonQuery()<br />
where ReturnSqlCommand() is a function that takes as string a parameter and returns it as an SqlCommand object. The above two are not the only statements. The application adds a set of statements at each postbacks. Through out this process there is no error or exception utill i try to commit or rollback the transaction object.
|
|
|
|
|
AFAIK: Everytime you postback, your page and all it's code behind variables are recreated and reinitialized, but controls retain their values because of the magical viewstate.
SqlTransaction doesn't have any concept of viewstate, so it's a fresh new SqlTransaction each time.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Thank you Steve
Is it anyway possible to preserve the transaction b/w postbacks? Is there any chance of transaction getting timed out?
|
|
|
|
|
Hello,
In my internet site, i have to proivde search functionality within the website domain. Could you please give some light where should i look for related articles,sample code, ideas etc....
Thanks,
Thanks
|
|
|
|