|
You need to write a custom binding that formats the text to show it the way you want it to, with a link to the other page.
Is this homework ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks for rewriting my question as answer...yes it's homework.
|
|
|
|
|
Priya Prk wrote: Thanks for rewriting my question as answer...yes it's homework.
That sounds bad. Really bad!
|
|
|
|
|
Priya Prk wrote: Thanks for rewriting my question as answer...yes it's homework
Please don't reply like this from next time. Try to understand what was the meaning of that answer.
|
|
|
|
|
I got it now, thanks for helping guys
|
|
|
|
|
Hi All,
Please let me know whether we can call functions of a win32 dll from a ASP.Net.
Regards,
Ashwath Hegde
|
|
|
|
|
Please don't Cross Post. If your last post was wrong then modify it. Don't RePost.
|
|
|
|
|
|
If this is a new question then your other one was off topic. You're basically asking the same thing, which is rude.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Yes, of course you can. Just use p/invoke.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I have a checkbox in a template field in a gridview.
<asp:TemplateField HeaderText="test templet">
<ItemTemplate>
<asp:CheckBox ID="CheckBox2" runat="server" AutoPostBack="True"
Checked='<%# Bind("Archived") %>' oncheckedchanged="CheckBox2_CheckedChanged"/>
</ItemTemplate>
</asp:TemplateField>
Oncheckedchanged calls a code behind subroutine. I need to pass that subroutine the GridView datarow index so I can do some test on that particular record. I can’t seem to figure out how to do that.
Thanks
|
|
|
|
|
Where is your code behind code ?
|
|
|
|
|
I just figured it out -
simple....
Protected Sub CheckBox2_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Dim gvRow As GridViewRow
Dim chkbx As CheckBox
Dim intRowIndex As Integer
chkbx = sender
gvRow = chkbx.Parent.Parent
intRowIndex = gvRow.RowIndex
' perform work agains that row here
end sub
Thanks for the reply.
|
|
|
|
|
Hi All,
Please let me know whether we can call functions of a win32 dll from a vb.net application.
Regards,
Ashwath Hegde
|
|
|
|
|
ashwath1979 wrote: Please let me know whether we can call functions of a win32 dll from a vb.net application.
In ASP.NET ?
|
|
|
|
|
Cheers to all the mavens out there on codeproject!
I've banged my head over this one for some time, and I don't understand the reason for this FormatException (log entry) as thrown by Convert.ToInt32 that uses an input value from an ASP .NET 2.0 form *with* validation:
ERROR 16 Jul 2009 09:01:13,970 (Webpage code-behind class name) - Failed conversion of value
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at (name of calling function in ASP.NET code-behind)
The code-behind of the web page is as follows:
try
{
dataObject.Weight = Convert.ToInt32(txbWeight.Text);
}
catch (Exception e)
{
log.Error("Failed conversion of value", e);
}
And the web page has the following validation for the txbWeight TextBox control:
<asp:CompareValidator runat="server" ControlToValidate="txbWeight" Type="Integer"
Operator="GreaterThanEqual" ValueToCompare="0" Text="Positive number only for weight."
Display="Dynamic" />
I don't understand why this exception is thrown, because the validator ensures that an integer is being received from the user (txbWeight also has a RequiredFieldValidator). The odd thing is that dataObject receives the value despite the exception being thrown!? I don't believe I need to call Trim(), and trying this in the past did not fix the issue.
Any ideas?
|
|
|
|
|
Always use int.tryparse, not convert.toint32. Do you have text in there, do you need to tell the validator to accept an empty field ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks for the response Christian. I am indeed using a RequiredFieldValidator for the textbox so it should never recieve an empty input... I can't seem to duplicate this myself in my test environment; it only happens in production so there must be some weird case causing it that I cannot imagine.
Well anyhow, I'll switch over to using Int32.TryParse(...) as you'd suggested; this probably is a better solution and I've had much less frustration on projects by doing the analogous thing with Dictionary<t,t>.TryGet(...).
Cheers,
J. Patel
|
|
|
|
|
Hi
I have a treeview on my webpage which is bound to database. On the selected node it should insert a HTML Span Tag with Node value and and Node Text into freetext box using javascript. Like this one
<Span id="NodeValue">Node Text</span>.
As we can not insert HTML into Freetextbox from codebehind therefore I have Used Javascipt funtion for insert HTML.
I have tested javascript function on button click event it is working fine. Remember that I have pass two parameter to javascipt funtion fieldid and field for NodeValue and NodeText respectively.
How I can call javascipt funtion on Node select event in ASP.Net and How I can set values for parameters of this functions.
The HTML Code is
<asp:TreeView ID="TVSectionContentsList" runat="server" Height="200" Width="200" BorderWidth="2">
<SelectedNodeStyle Font-Bold="True" Font-Underline="True" Font-Italic="true" />
</asp:TreeView>
The javascript function is given below
function insertValue(fieldid, field){
FTB_API[ '<%=FreeTextBox1.ClientID%>'].Focus();
FTB_API['<%=FreeTextBox1.ClientID%>'].InsertHtml('<span id=' + fieldid + '>' + field + '</span>');
window.event.returnValue = false;
FTB_API[
'<%=FreeTextBox1.ClientID%>'].Focus();
}
|
|
|
|
|
hi,
I am facing strange problem , when i email the below html body format
in gmail it goes in to inbox, but when i send it to my company id, it goes in junk folder, y it is so??????????
>Thank you for completing the voter registration for the Industry Personality of the Year.
>Please click here <http://localhost/BCIFinalAward/ConfirmVote.aspx?voterid=o3EscXnBscI> to confirm your vote.
a
|
|
|
|
|
Is it making Junk in your Company MailBox or in GMail. If you see Gmail, Gmail may check the sender and ignore phishing links provided with the mail.
Check if the IsBodyHtml of the MailMessage object is set to true as well...
And also make proper HTML document always if you set IsBodyHtml to true. Dont put anchor tag inside a plain text email body.
|
|
|
|
|
Abhishek Sur wrote: Is it making Junk in your Company MailBox or in GMail
Junk mail is coming in my company mailbox
Abhishek Sur wrote: Check if the IsBodyHtml of the MailMessage object is set to true as well... Smile Smile
Already done
Abhishek Sur wrote: And also make proper HTML document always if you set IsBodyHtml to true. Dont put anchor tag inside a plain text email body.
Cannot understand i am attaching my my code 4r ur reference.
try
{
string authUser = System.Configuration.ConfigurationSettings.AppSettings["MailServerUserName"].ToString();
string authPass = System.Configuration.ConfigurationSettings.AppSettings["MailServerPassword"].ToString();
string domain = System.Configuration.ConfigurationSettings.AppSettings["Domain"].ToString();
NetworkCredential authenticatedMail;
if(domain != "")
authenticatedMail = new NetworkCredential(authUser, authPass,domain);
else
authenticatedMail = new NetworkCredential(authUser, authPass);
string SMTPServer = System.Configuration.ConfigurationSettings.AppSettings["MyMailServer"].ToString();
SmtpClient client = new SmtpClient();
client.Host = SMTPServer;
client.Port = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["MyMailServerPort"]);
MailAddress from = new MailAddress(fromEmailAddress, fromName);
MailAddress to = new MailAddress(toAddress, toName);
MailMessage message = new MailMessage(from, to);
message.Subject = Subject;
message.Body = MessageBody;
message.IsBodyHtml = true;
message.Priority = MailPriority.High;
client.UseDefaultCredentials = true;
client.Credentials = authenticatedMail;
client.Send(message);
resultMail = true;
}
|
|
|
|
|
Check how i created body
StringBuilder objMessageBody = new StringBuilder();
objMessageBody.Append("<br />");
objMessageBody.Append("Thank you for completing the voter registration for the Industry Personality of the Year.");
objMessageBody.Append("<br />");
objMessageBody.Append("Please click <a href=" + getConfirmURL(result) + ">here</a> to confirm your vote.");
|
|
|
|
|
Is your from address is a real mail address that is declared in exchange?
|
|
|
|
|
I am displaying a preview of the Image before uploading it to the server. This works fine with IE6, but not working with newer versions.
The previewing is achieved using an aspx page which has an <asp:image> control. I set the ImageURL property to the "file from the physical location". But in IE7's case, the ImageURL property does not display "file from the physical location".
for instance: <asp:image id ="imgPreview" ImageUrl="file:///D:\image1.jpg">
Kindly provide any help. Thanks in advance.
Regards,
Rijz
|
|
|
|