|
It doesn't need to be in edit mode, and you can use JavaScript
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
C# Code
this.Dispatcher.BeginInvoke(delegate()
{
PropertyChanged(this, new PropertyChangedEventArgs("FileLength"));
});
VB.NET Code
Me.Dispatcher.BeginInvoke(Function() Do
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs("FileLength"))
End Function)
But it is not working i tried the code convert for the same, then did google also but unable to get the correct syntax.
Plz help
|
|
|
|
|
|
So what is the way to do the same. the senerio is
i have a delegate defind say "ProgressChangedEvent"
i my class i have a event "UploadProgressChanged" of type "ProgressChangedEvent"
now RaiseEvent ProgressChangedEvent(me,args) working fine for me, but i want the asyncronous call, so want to use.
dispature.beginInvoke( <event call="">)
so how could i call the event.
Thanks Plz help...
|
|
|
|
|
Drop the "Do" - this is a bug in the converter you used.
You can drop the 'End Function' since it's just a single statement.
Which version of VB are you using?
If you're using VB10 (VS 2010), change the 'Function' to 'Sub' since nothing is being returned.
David Anton
Convert between VB, C#, C++, & Java
www.tangiblesoftwaresolutions.com
|
|
|
|
|
Hi David,
Thanks for the reply is am using VS2008 SP1.
My Code is like below
Me.Dispatcher.BeginInvoke(Function() Do
RaiseEvent PropertyChanged(Me,New PropertyChangedEventArgs("UploadPercent"))
End Function)
As per your instructions i have change it to
Me.Dispatcher.BeginInvoke(Sub
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs("UploadPercent"))
)
But it is again not working for me....
Possible solution???
Thanks
|
|
|
|
|
For 2008, you'll need:
Me.Dispatcher.BeginInvoke(Function() AnonymousMethod1())
Private Function AnonymousMethod1() As Object
PropertyChanged(Me, New PropertyChangedEventArgs("FileLength"))
Return Nothing
End Function
David Anton
Convert between VB, C#, C++, & Java
www.tangiblesoftwaresolutions.com
|
|
|
|
|
Dear All,
This is a c# code working fine in, Where files is a genric collection.
<br />
files.Count(f => f.Status == FileUploadStatus.Uploading || f.Status == FileUploadStatus.Resizing)<br />
i convert the same in vb.net using some convertion tools, and i got
<br />
files.Count(Function(f) f.Status = FileUploadStatus.Uploading OrElse f.Status = FileUploadStatus.Resizing)<br />
and its not working, got the error like
ReadOnly Property Count() As Integer' has no parameters and its return type cannot be indexed.
So plz help and let me know what is wrong i m doing here with possible solution.
Thanks
|
|
|
|
|
|
Hi every1,
I know the approaches for validating data. I went through some articles regarding validating. I face with a problem when I implementing them.
if I use the following code there is no problem.easily I can raise the error.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.ComponentModel.DataAnnotations;
namespace MvcApplication1.Models
{
public class GuestResponse
{
public string _email;
[Required(ErrorMessage = "Please enter your email address")]
[RegularExpression(".+\\@.+\\..+",
ErrorMessage = "Please enter a valid email address")]
public string Email
{
set { _email = value; }
get { return _email; }
}
public GuestResponse()
{
}
public GuestResponse(string email)
{
this._email = email;
}
}
}
I am using another approach which is attribute and methods. when I defined a class through an exception I validate my data.but the problem is I cant show them on the screen. when the exception raise it goes to the line of exception while I wanna show the message on the screen.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.ComponentModel.DataAnnotations;
namespace MvcApplication1.Models
{
public class GuestResponse
{
public string _name;
public string Name
{
set
{
if (value == null)
{
throw new ArgumentException(string.Format("Enter a value."));
} else
_name = value;
}
get { return _name; }
}
public GuestResponse()
{
}
public GuestResponse(string name, string email, string phone, Boolean attend)
{
this._name = name;
}
}
}
Could you please help me out how to fix this problem?
thanx in advance.
|
|
|
|
|
1. Remove your previous question before someone replies to it. Looks like by-miskate you posted that.
2. You need to catch the exception and then show it a messagebox or a label (on screen.)
|
|
|
|
|
|
Hello,
I have a flash menu that includes category links to my aspx pages(and sub-categories). This flash menu is located on a MasterPage, and all of my content is inside a content place holder.
Whenever i click an item in the flash menu, the flash reloads itself while entering the page, which is absolutely normal.
I tried using Frameset in .Net it didnt work for me. tried also the UpdatePanel also didnt work, maybe I've done something wrong in there or whatsoever.
Can anybody tell me please how to do this so the flash menu wont reload each time i click an item?
Thanks.
|
|
|
|
|
How are you using the iframe and UpdatePanel? Anything that causes a postback will of course cause the page to reload and hence the Flash.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i used the UpdatePanel by draging it to the masterpage and inside of it i draged my flash control, and pointed a trigger to the contentplaceholder. but that didnt work for me
about the Iframe.. im not sure if i did it the right way.
|
|
|
|
|
Farraj wrote: im not sure if i did it the right way
Neither am I, my mind reading ability is only good within 3 meters of someone.
Perhaps if you showed some code we could help.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
update panel:
masterpage cs code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ScriptManager1.RegisterAsyncPostBackControl(ContentPlaceHolder1);
}
}
aspx code:
<form id="form1" runat="server">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<uc2:menu1 ID="menu11" runat="server" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ContentPlaceHolder1" />
</Triggers>
</asp:UpdatePanel>
</form>
hmm...?
|
|
|
|
|
"Controls that are triggers for an update panel cause a refresh of the panel's content after an asynchronous postback." http://msdn.microsoft.com/en-us/library/system.web.ui.asyncpostbacktrigger.aspx[^]
So what you have configured is having the ContentPlaceHolder trigger a refresh of the UpdatePanel; however, I believe you want the reverse. Also, since ContentPlaceHolder has no events that can be triggered, nothing will happen. Finally, RegisterAsyncPostBackControl is the code behind is unnecessary since you have already specified it in the markup.
As a matter of convention ScriptManager is usually added to the top of the form.
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<uc2:menu1 ID="menu11" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="menu1" />
</Triggers>
</asp:UpdatePanel>
</form>
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
im trying this. but at the Triggers i cant point it to the Menu, i only can point it to the content placeholder
..?
|
|
|
|
|
|
hiiiiiiiii
i have a situation where i have to select a row in gridview on single mouse click and when i click the delete button the selected row should be deleted. on double click only the selected row values should be loaded into the asp controls.for the double click i had written the code in row databound as
e.Row.Attributes["ondblclick"] = (ClientScript.GetPostBackClientHyperlink(this.gv1_Country, "SELECT$" + e.Row.RowIndex));
and by this i stopped the single mouse click to the datagrid.
when coming to single mouse click i had taken a hiddenfeild value and i want to assign the selected row primary key to that hidenfeild value.
for that i had written the code in row databound as
e.Row.Attributes.Add("onclick", "document.getElementById('hiddenfeildid').value=this.rowIndex");
and now the selected row index value is not coming into the hiddenfeild value.....
i hope all u understood my problem...
anyone kindly help me.............
Thanks in Advance....
VISHNU
|
|
|
|
|
vishnukamath wrote: e.Row.Attributes.Add("onclick", "document.getElementById('hiddenfeildid').value=this.rowIndex");
Are you sure this line is correct from Javascript prospective? It might be that the hidden field used is a server field (to use it in code behind) and so the actual id of the field when page renders is not just 'hiddenfield'.
2 things:
1. try an alert box first. Popup the alert(this.rowindex);
2. Do a view source and check what is the ID of the hidden field. If step 1 works above as expected then replace the ID with what you find in viewsource.
|
|
|
|
|
Hi Vishnu,
Please take 2 seperate button fields i.e. 1)Edit button 2)Delete Button. I think it'll be easy for u to code for actions.
|
|
|
|
|
I am creating a report using rdlc files. I want page break at the end of a group , but not at the end of last one.I googled a lot.After 2 hrs of googling i dint found any correct solution....
In my example ,there is a lot of records.After 20 records,it will have to throw balance records to next page.I hav already put the condition for page break.It showed only 20 records.Please help me..Please reply fast..
|
|
|
|
|
Thanusree Duth wrote: Please reply fast..
Avoid it from next time!
Thanusree Duth wrote: I want page break at the end of a group , but not at the end of last one
It won't give a break at the end. Though you question sound incomplete, only reason to post/ask such thing could be getting a blank page after last page break at the end. If so, then it would be because of some extra space at the end in your report designer.
If this is not the case, update the question with more details.
|
|
|
|