|
Actually Input type file is the most problematic dom element I have ever seen. Just you cant open a file without the user to have selected through browse button. Even after choosing the file if you just append the control to another form using javascript, the file reference will be wacked up.
I think what is the most viable thing to do, is to upload the file to the server when user chooses the file and then hold the context of the file in the server.
Other Wayouts :
Otherwise, I think you can embed a flash object in the browser to open files using flash open dialog box. Flash is more powerful in this regard.
You can also use Silverlight, If you wish...
|
|
|
|
|
Hi,
I'm trying to use WindowsLiveSearchProvider for search in my ASP.NET website. I've configured proxy and AppId in the web.config.
<system.net>
<defaultProxy enabled="true" useDefaultCredentials="true">
<proxy bypassonlocal="True" proxyaddress="http://proxyServer:80"/>
</defaultProxy>
</system.net>
<microsoft.web.preview>
<search enabled="true">
<providers>
<add name="WindowsLiveSearchProvider" type="Microsoft.Web.Preview.Search.WindowsLiveSearchProvider, Microsoft.Web.Preview"
appID="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" siteDomainName="http://localhost:49781/" />
</providers>
</search>
<diagnostics enabled="true"/>
</microsoft.web.preview>
This is the html part:
<asp:GridView runat="server" ID="myGrid" datasourceid="mySource" AutoGenerateColumns="false">
<Columns>
<asp:BoundField HeaderText="Title" DataField="Title" />
<asp:BoundField HeaderText="Url" DataField="Url" />
<asp:BoundField HeaderText="Description" DataField="Description" />
</Columns>
</asp:GridView>
<asp:SearchDataSource ID="mySource" runat="server">
<SelectParameters>
<asp:ControlParameter Name="query" Type="String" ControlID="query" />
</SelectParameters>
</asp:SearchDataSource>
But when click on Search, I receive SoapException. This is the Stack Trace:
[SoapException: Client Error]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431766
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
Microsoft.Web.Preview.com.msn.search.soap.MSNSearchService.Search(SearchRequest Request) +107
Microsoft.Web.Preview.Search.WindowsLiveSearchProvider.Search(SearchQuery searchQuery) +606
Microsoft.Web.Preview.Search.SearchService.Search(SearchQuery query) +264
Microsoft.Web.Preview.Search.SearchService.Search(String query) +85
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +261
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +488
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1247
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +22
System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +17
System.Web.UI.Control.PreRenderRecursiveInternal() +80
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
I've Googled for a while, but could not find a solution. Any help in this regard would be sincerely appreciated.
Blumen
“Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.”
|
|
|
|
|
i want to apply font size and color which i had in one of the cssclass in stylesheet.I want to apply it on the string . Can anyone please let me know how it is done.
|
|
|
|
|
Why do you want to apply a CssClass to a string variable? If you are trying to show string (or text) with specific font size , apply the CssClass to the control through which you are displaying the string. (For e.g. a Label would serve the purpose)
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
that's the problem . it has to be applied to only part of the string which is text of a textbox.
|
|
|
|
|
Ok...I think you cannot do it using a normal TextBox...Probably the other way would be to write your own custom TextBox control and render the text as according to your requirement.
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Hi,
You can assign your string value to a label and assign style sheet for that label ,...
hope this will help u...
|
|
|
|
|
Hi,
I have two website projects in vs 2008 and i need to integrate with these two projects
and i want session to be shared amoung the projects,
Is it possible in vs2008?
|
|
|
|
|
Ramesh A. wrote: I have two website projects in vs 2008 and i need to integrate with these two projects
and i want session to be shared amoung the projects,
Is it possible in vs2008?
What do you mean integrating ? Do you want to share session information between two web application?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
|
Read This[^] Article.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
as i know the session should be created at the server, and does it create a new session for each request that a browser requests(for each page it requests) or one session for one browser, means once the browser requested the first pg then web server creates a session and keep it until the browser closes or session expires.
|
|
|
|
|
Hi,
It does not create session on every request. Server creates session only once when you declare in your code and keep alive until you have kill it or close the browser.
krishna veer singh
|
|
|
|
|
Please Read[^] this article. This will resolve your query and you can also learn something new from it.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
tanx, but i'm experiencing that is confucing.i use a web service to server the web application. the problem is when user login i create the session
this.Session.Add("customer", customer.CUSTEMAIL);
then insert it to table (db) to restrict the same user log in.
in the log off method i use
customer.CUSTEMAIL = this.Session["customer"].ToString();<=====A
if (Customerinfo.delete_session(customer))
{
this.Session.Abandon();
return "log off successful";
}
else
{
return "log off failed";
}
to delete the record in the db and then destroy the session, but the prolem is when logging off at point A the session count is 0 means no session object and gives null ref exception, could you tell me what is going wrong here.
|
|
|
|
|
Hi,
Only one seesion value will be created
|
|
|
|
|
Hi friends...
Please help....
I have created a setup in VB.NET and installing in different machines. Now the problem is that the same setup is working on some machine fine, while same setup is not working. When i am trying to run the application its giving a message that "unable to find a version of the run time to run this application".
And also i want to tell you that all those machine having same configuration and same operating system, same anti virus.
Now please help me... i got frustrated with this kind of error.
krishna veer singh
|
|
|
|
|
krishnaveer wrote: I have created a setup in VB.NET and installing in different machines.
Are you talking about Web Setup or Application Setup ?
krishnaveer wrote: And also i want to tell you that all those machine having same configuration and same operating system, same anti virus.
Does all the system having .Net Framework?
if you want to run it all system, while building the setup,make sure in pre-requisite you have select .NET framework as pre install.
let me know if more issue.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Dear Expert,
I have Created a User Control Which Display the Match Fixture of the Football Game.
I Place this Control In the Repeator Control and Fixture Data is come from the Database.NOw I want to display that control as a slide show.Means One User control with one data at a time.all the help and suggestion are highly appreciated.
|
|
|
|
|
add the position attribute to the repeater control as relative and for the user control in Item Template add the position style attribute as absolute with left and top as 0.
Also make sure you give a zindex attribute in a progressive way. Then using client side javascript you can change the z-index to give a slide show effect.
e.g:
.
.
<asp:repeater id="myRepeater" runat="server" ....="" style="position: relative" xmlns:asp="#unknown">
.
.
.
<itemtemplate>
<uc1:[yourusercontrol]>
now use a javascript to get hold of the inner contents and change the zIndex attribute value.
Let me know if you need sample code.
Regards,
Cybernate
|
|
|
|
|
string str = "009810";
int _zip = Convert.ToInt32(str);
Now i am getting result as 9810. But i need it as 009810.
How can i get this? how can i convert this string to integer
G. Satish
|
|
|
|
|
You cannot store an integer value with a leading zero...Actually why do you want to do that?
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
modified on Tuesday, March 24, 2009 1:59 AM
|
|
|
|
|
Actually my string will be like this...
Mainstring = "009816-9234";
I am splitting this and taking part in to integer and add one value to it and then send as parameter to a query to check this in database.
i.e string str = "009816";
_zip = Convert.ToInt32(str);
_zip = _zip + 1;
ProcessthisinQuery(_Zip)
{
}
G. Satish
|
|
|
|
|
so how come it makes a difference ... i mean _zip now contains 9817. Whether 0009817 or 9817 both refer to a same value...
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
No, both are not same....
When i query like this...
Select * from Table Where Zip = '009817' Which gives results
But when i use the same query with zip = '9817'
Select * from Table Where Zip = '9817' Which doen't gives any results
The Data in the column contains with zip as 009817. So second query doen;t match
G. Satish
|
|
|
|