|
I have a need to convert the string file path to HttpPostedFile format.
can any one help me
For eg:
string file ="E:\pic.gif";
I need the above to HttpPostedFile format.
Thanks
|
|
|
|
|
Premchand MR wrote: I need the above to HttpPostedFile format
AFAIK, you can't.
|
|
|
|
|
The PostedFile property is Read-Only, which means readonly access. Assigning a variable to it won't work because the HttpPostedFile object has already been created when you clicked 'Submit'.
What exactly is it that you want to do? As far as I can tell you're trying to move a server file and not upload a client file...
Daniel Minnaar
Lead Software Developer
|
|
|
|
|
Hi, I have requirement like this..
I have one windows form which contains datagrid which displays the data.
And another button is there outside of grid in winform. If i click on button, the datagrid has to be printed...
so, i need to call window.print() in button click..
Ho can i call javascript in button click.
Thanks in advance
|
|
|
|
|
Hi,
I am using a DetailsView, which hooks up to a ObjectDataSource. The ObjectDataSource defines DataObjectType, so that insert/amend operations give me this DataObject, instead of a collection of values. This is all fine.
What I want to know is if it is possible to get this same object from the DetailsView without having to trigger such an operation (i.e. insert/edit).
So, does anyone know how the ObjectDataSource gets the DataObject from the DetailsView (i know about Data Binding)?
Alternatively, is there a way to specify a non-standard method, which can take advantage of the same features that are available to insert/edit/delete?
thankyou
|
|
|
|
|
Hi ,i have to import all Outlook Contacts into my Sql table via asp.net,
Its possible ?,plz if anyone have idea abt that plz share with me,
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
Reading a list of contacts from an Access database which has been exported from Outlook, and importing a comma separated CSV file into the same Access database of contacts.
We’ll be using the built in OleDb data classes for database connectivity and some fairly complex DataSet and DataTable manipulations to accomplish our importing from the CSV file.
Get it here for more details.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
Hi,
i am trying to use in my client application a web service that retuurns an arrylist.
this is my code
ArrayList b = new ArrayList();
b = newService.GetList();
when i try to compile it i get this message:
Cannot implicitly convert type 'object[]' to 'System.Collections.ArrayList
what is the problem? how can i get the array list from the webservice?
thanks
|
|
|
|
|
The problem is that you are returnin an object[] and you need to convert or cast it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Your GetList() function in your web-service hasn't been defined properly. Make sure that the return type is an ArrayList
public System.ArrayList GetList()
{
}
Daniel Minnaar
Lead Software Developer
|
|
|
|
|
this is my webservice:
[WebMethod]
public ArrayList GetDevicesList()
{
Hashtable DeviceList = new Hashtable(10);
for (int i = 0; i < 10; i++)
{
DeviceList.Add("test"+i.ToString(),"test");
}
ArrayList a = new ArrayList();
a.Add(DeviceList);
return a;
}
of course my hash table will later be set with real values, but for now i am just testing my architecture.
so it does return ArrayList.
how can i use it from my client?
|
|
|
|
|
hi all
I have 3 frame in page asp.net
When i debug the frame ifmap run fist in and run to in page_load in map.aspx
How can i set frame ifmap2 run fist so dont change position iframe ???
|
|
|
|
|
This is a bit of a hack, but...
page_Init will run before page_Load. So if you do your stuff for ifmap2 in its page_init and your stuff for ifmap in its page_Load the order will be as you have requested.
|
|
|
|
|
Hi,
I'm making a website in ASP.NET (C#) that handles users. How do I store data specific to the user's connection. I got it working using static variables, but it turns out that all users have the same values for static variables (which makes sense now that I think about it).
How can I "remember" the user id of someone who logged in and not have it mix up other users? I know I could do it by using a static hashtable of userids and ipaddresses but I feel like this is probably a more complicated solution than it needs to be.
I know this is probably a pretty common question, and I'm sorry if its been asked before. Any response would be helpful though. Thanks,
|
|
|
|
|
Most people do not have static IP addresses. You would expect to have a database of usernames and passwords and then store who is logged in, in the session.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thanks christian. the word 'session' was what i was looking for. I appreciate it...thanks a lot man,
-ken
|
|
|
|
|
I am just working with ASP.NET 2.0 and started first chapter Online Diary project. The first page contains asp:CreateUserWizard control. For some reasons it does not work properly. So I created my own test website and add that control. It is the same result. I entered more than 7 characters with at-least on numerical character but I get the same reply “Password length minimum: 7. Non-alphanumeric characters required: 1.”. Does someone know what is going on? If I want to test the password with database how can I retrieve the password? How to remove some of the controls from wizard? Your help will be very much appreciated.

|
|
|
|
|
i am trying to export a excel file to the user when they click a button, i tried Response.WriteFile("filename"), it only display the content in the same page, can someone tell me whats the code to prompt them with a save as option? Thank you in advance.
|
|
|
|
|
You need to set the content type to be application/zip and then it will come back as a download.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Another way is to add the file in header of the response
<br />
tring filename = "YourFileName.xls";<br />
<br />
if (filename != "")<br />
{<br />
<br />
string path = Server.MapPath(filename);<br />
<br />
System.IO.FileInfo file = new System.IO.FileInfo(path);<br />
<br />
if (file.Exists)<br />
{<br />
<br />
Response.Clear();<br />
<br />
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);<br />
<br />
Response.AddHeader("Content-Length", file.Length.ToString());<br />
<br />
Response.ContentType = "application/octet-stream";<br />
<br />
Response.WriteFile(file.FullName);<br />
<br />
Response.End();<br />
<br />
}<br />
<br />
else<br />
{<br />
<br />
Response.Write("This file does not exist.");<br />
<br />
}<br />
<br />
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... "
|
|
|
|
|
I have a gridview with two template fields and two data bound fields.
The two template fields are a checkbox and a textbox. My problem is I only want the textbox visible when the checkbox is checked.
I have been trying to do this with C# in code behind--but I am off to a bad start, this is new to me. Thanks in advance for any help.
My aspx code for the gridview columns is:
<Columns>
<asp:TemplateField HeaderText="Select">
<ItemTemplate>
<asp:CheckBox ID="chkSelect" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="PSO" HeaderText="PSO" SortExpression="PSO" />
<asp:BoundField DataField="PSO_id" HeaderText="PSO_id" InsertVisible="False" ReadOnly="True"
SortExpression="PSO_id" />
<asp:TemplateField HeaderText="Percent">
<ItemTemplate>
<asp:TextBox ID="percentEntered" Width="40px" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
|
|
|
|
|
i have sucessfully created a login system that enables users to register and login using visual studion 2005. It works fautlessly on the local machine. However when i run it remotely i get an error. the details of the error are not displayed to me. It is obviously a problem with IIS configuration???? can anyone help please.
|
|
|
|
|
how can i create nested grid
wasim khan
|
|
|
|
|
|
Hi u can do nested grid using template column...,
in that template column u can asign one more grid...,
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|