|
thanx for your response.
Can you explain it with an example.
|
|
|
|
|
Hi guys i am getting value in exponential
like :3.14765786987878E-6
I need thsi value in exact way
like : 0.00 some thing it has to come..,
I searched in google and tried in all the ways but i didnt get solution...,
plz help me,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
Hi,
I am implementing auto complete extender in my project. I want a loading image to be displayed in the textbox while the data is being fetched from database and presented to the user.
<asp:TextBox id="TextBox2" Width="216px" runat="server" Text='<%# Bind("c_name") %>' autocomplete="off" ></asp:TextBox><br />
<br />
<cc1:AutoCompleteExtender id="AutoCompleteExtender1" runat="server" ServiceMethod="fetch" TargetControlID ="TextBox2" ServicePath="autocom.asmx" CompletionSetCount ="12" EnableCaching ="true" MinimumPrefixLength ="2"> <br />
</cc1:AutoCompleteExtender>
|
|
|
|
|
You can use AJAX UpdateProgress control to get that functionality. See here UpdateProgress control[^]
"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)
|
|
|
|
|
md_azy wrote: I want a loading image to be displayed in the textbox while the data is being fetched from database and presented to the user
use AJAX UpdateProgress Control.
|
|
|
|
|
1st Approach
<script type="text/javascript">
function ShowImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'url(images/loader.gif)';
document.getElementById('txtAutoComplete')
.style.backgroundRepeat= 'no-repeat';
document.getElementById('txtAutoComplete')
.style.backgroundPosition = 'right';
}
function HideImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'none';
}
</script>
Now write this code in Page_Load event of aspx page
protected void Page_Load(object sender, EventArgs e)
{
this.txtAutoComplete.Attributes.Add
("onkeypress", "ShowImage()");
this.txtAutoComplete.Attributes.Add
("onblur", "HideImage()");
}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2nd approach
This approach works if you are using newer versions of AjaxControlToolkit.dll (Version 1.0.20229.20821 or later)
For this write the above mentioned javascript in head section of html markup of page.
Now in source of autocomplete extender add OnClientPopulating="ShowImage" and OnClientPopulated="HideImage"
<ajaxToolkit:AutoCompleteExtender runat="server"
ID="AutoComplete1"
BehaviorID="autoComplete"
TargetControlID="txtAutoComplete"
ServicePath="AutoComplete.asmx"
ServiceMethod="GetCompletionList"
MinimumPrefixLength="1"
CompletionInterval="10"
EnableCaching="true"
CompletionSetCount="12"
CompletionListCssClass=
"autocomplete_completionListElement"
CompletionListItemCssClass=
"autocomplete_listItem"
CompletionListHighlightedItemCssClass=
"autocomplete_highlightedListItem"
onclientpopulating="ShowImage"
onclientpopulated="HideImage">
</ajaxToolkit:AutoCompleteExtender>
<script type="text/javascript">
function ShowImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'url(images/loader.gif)';
document.getElementById('txtAutoComplete')
.style.backgroundRepeat= 'no-repeat';
document.getElementById('txtAutoComplete')
.style.backgroundPosition = 'right';
}
function HideImage()
{
document.getElementById('txtAutoComplete')
.style.backgroundImage = 'none';
}
</script>
|
|
|
|
|
Hi,
I have a GridView with a FormView on its EmptyDataTemplate so that user can insert a row initially. I provide controls on Footer so that user can add rows from within the GridView. I also use inline editing and deletion. Datasource is SqlDataSource.
Problem is that when I refresh the page duplicate row is added with previous data in the grid footer controls.
I tried many ways to avoid it, I tried
Page.IsValid (it returns true!), I tried to check for
e.Command == "insert" , that too is correct. Even the
TextBox.Text has values though it is empty after a manual insert operation.
What am I doing wrong here?
Regards,
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.”
|
|
|
|
|
In the Insert command event,write the code which validates the data to check for the duplicates and then insert into the SqlDataSource. Update the gridview only if the transaction is successful.
"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)
|
|
|
|
|
Thank you, I appreciate that. I was looking for less-code approach
“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.”
|
|
|
|
|
Ok! Find it out and let me know
"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 All,
On a button click event I redirect to a page as like this.
Response.Redirect("MyPage.aspx")
But it redirect to another page. Actually when I debug the code and see it working fine. But after hosting the size on IIS and access through the local IP url it doesn't work. Any suggestions?
I appreciate your help all the time...
CodingLover
|
|
|
|
|
The only thing this code can do, is redirect to MyPage.aspx. If you end up at another page, then other code is running, or that page is redirecting you again.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Two things may be wrong in this case:
(i) The hosted version may be different than the original one. So, check the code.
(ii) Check the other page where you are going to redirect. Is there any redirect code written inside the page load?
Either you love IT or leave IT...
|
|
|
|
|
I have a wizard conntrol in my form. I need to call another page inside the wizard control and do some operation in one of the steps.
For eg: Form1 has a wizard control. After clicking Next button of the firt step or second step, it should go to another page, say Form2, and perform some operation and come back to Form1 itself. Is it possible to do that? Also if I want some value from From2 to Form1, is that possible?
Any idea how to do implment this? Please help.
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
This sounds insane. You should factor out the action you want, to another class, or a control that can be used in two places.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I dont think it is possible to invoke another page within wizard control.
But if u want to navigate from one page to another and back to same page, i dont see any problem. Wizard control has nothing to do with.
And if u want values from page2 to page1, they are possible with sessions, query strings,..
modified on Wednesday, May 6, 2009 1:41 AM
|
|
|
|
|
As the title,when I do some changes in design view,the source view can not do the same changes.
We have a ASP.NET Menu control located within a Wizard control. When we change a property (e.g. Text) in a MenuItem, the change is effective in the design view, but is not sychronized to source view.
Product Language: English
Version: Visual Studio 2008 SP1
Operating System: Windows XP
Operating System Language: Chinese
Thank you.
|
|
|
|
|
Save your project, close Visual Studio 2008 IDE, reopen it, reopen the project. This sequence may solve this problem.
Either you love IT or leave IT...
|
|
|
|
|
Thanks for your answer.
But I do as your instruct,I can't resolove it.
Almost everytime,when I open the project,I meet with the proplem.
Our develop team all meet with the proplem.
|
|
|
|
|
hello everyone,
i'm looking for code (asp.net with c sharp) to send email on web.
many thanks,
asp.net beginner
|
|
|
|
|
I wrote an article on how to use google, it's here on Code Project. You should read it. Sending an email is both so trivial, and so widely documented, that I used it as the example in showing how to find basic information on the internet.
ASP.NET also cannot send email, your website will use .NET code that does not depend on ASP.NET
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
|
misCafe wrote:
i'm looking for code (asp.net with c sharp) to send email on web.
Before post, please go through the forums guide lines. Did you search google before post it?
Check Here
|
|
|
|
|
Hi,
Here is a short example:
var smtp = new SmtpClient { Host = ConfigurationManager.AppSettings["smtpserver"]};
var mail = new MailMessage { From = new MailAddress("me@me.com") };
mail.To.Add(new MailAddress("some@email.com"));
mail.Bcc.Add(mail.From);
mail.Body = "Testing";
mail.IsBodyHtml = true;
mail.Subject = "Subject";
try
{
smtp.Send(mail);
}
catch (SmtpException)
{
//Error handling here
}
Hope that this helps.
|
|
|
|
|
Thanks for your code.
Anyways, how to code if we set validation for email if it doesn't contain "@"?
Visoth
|
|
|
|