|
You might be setting it up on page_load :S
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
Have you stepped through the debugger ? If you're using a third party control, perhaps it is what sets the value ?
alaminfad wrote: " document.getElementByID('TextBox1').value = '' ; ")
That won't work. Perhaps if you used the right client side ID, it might.
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.
|
|
|
|
|
And also before you run a script check if the script block is already exists in the page.Do like this :
if(!this.ClientScript.IsClientScriptBlockRegistered("MyScript"))
{
Page.RegisterClientScriptBlock("MyScript","<script language=javascript>" & _
" document.getElementByID('" + TextBox1.ClientId +"').value = '' ; </script>")
}
Also make sure you are not doing this every time the page is posted back. Always check :
if(this.IsPostBack)
{
}
inside Page_Load
Finally, if you make TextBox as serverside, you can set the value inside ddlVacationTypes_SelectedIndexChanged by just calling
TextBox1.Text = ddlVacationTypes.SelectedValue
It must work.
|
|
|
|
|
Unfortunately it did'nt work ,i do want this every time the page is posted back , i mean when the user select from the DDL the textbox1 should be empty for him(user) to notice and select a date from the Obout calender image , i tried it both ways(if and if not is post back) it didnt work , i found this property Clear() on the Obout tutorials :
**************************************************
If you need to clear the current selected date simply call the method Clear.
Example:
<obout:Calendar runat="server" id="myCal">
</obout:Calendar>
<a onclick="myCal.Clear();">
Clear
</a>
***********************************************
by the way ive two page loads
one page_load in the user control where the DDl and obout Calender and of course its Textbox which we want to clear
Second page_load in the actual default page
so ive tried to use that property in both page_loads it didnt work ,i have follwed the debugger it going in the right way , here is the code
-----------------------------
Dim script As New StringBuilder
' Dim reader As StreamReader = File.OpenText(Server.MapPath(includeFilePath))
If Not Page.ClientScript.IsClientScriptBlockRegistered("MySript") Then
'script.Append(reader.ReadToEnd.Replace("{title}", Me.Title).Replace("{buttonLabel}", Me.ButtonLabel))
' delay alert 1 ms to handle postback
script.Append("<script language='javascript'>document.dfghsdfggetElementByID('Calendar1').Clear();</script>")
Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "MySript", script.ToString)
End If
--------------------------------------------------------------------
one more thing the server doesnt seem to validate what inside the script even if write
Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "MySript","Nothing")
what is a problem? + how to fix it?
|
|
|
|
|
<b></b>Hi!!
While opening a solution in VS.net 2003, i am getting an error:
"HTTP redirect request failed."
Please help.
modified on Wednesday, November 11, 2009 12:51 AM
|
|
|
|
|
Member 4959176 wrote: "HTTP redirect request failed."
have you googled this error..... post the code where you are getting this error...
|
|
|
|
|
yes I tried this in google but didnt get any correct solution.
The error is coming while opening the solution in VS.NET.
|
|
|
|
|
WEird. I googled it and found heaps[^] of help.
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.
|
|
|
|
|
but none of the solution is working for my application.
|
|
|
|
|
Well, if you want help, be clear. If you don't tell us what you tried, don't you think people here will just suggest the same things ?
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.
|
|
|
|
|
Member 4959176 wrote: < b >< /b >Hi!!
RPH - Reverse Polish HTML...
|
|
|
|
|
Hi All,
Can i Use Singleton design pattern in Web application like when i m calling Bll from the User inteface.
Thanks and regards,
Amit Patel
|
|
|
|
|
If you like. Knock yourself out.
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.
|
|
|
|
|
hi,
That is i m alrady doing .. thanks for ur advice
|
|
|
|
|
Yes you can!
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
Hi,
We have .Net Framework 1.1 and 2.0 installed on the same server. We now have new requirements that will need AJAX. We can either install:
1. .Net Framework 3.5
OR
2. AJAX Toolkit (with existing .Net Framework 2.0)
We do not want to have any issues with existing applications due to this. Please suggest which will be a better approach and what will be the impact on existing applications using older versions?
Are there any specific guidelines for having multiple versions on same server?
Regards,
Anuj Chauhan
+91 9313499294
anuj.mca@gmail.com
|
|
|
|
|
You don't need to install anything, unless what you mean is, we don't know enough to use AJAX and will need to use a Microsoft framework instead. AJAX is nothing to do with ASP.NET, only the Microsoft wrapper library is.
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.
|
|
|
|
|
u can install different version of dotnet framework.
there is no issue about it.
Feel free to use it.
even i have 1.0,2.0 and 3.5 framework installed on my system and had never faced a problem.
|
|
|
|
|
i have set autogenerate=true of gridview ,i have a
column in gridview having checkboxes ,when i check one of the checkbox , gridview disappear .
I have bind my gridview in
if(!ispostback)
{
}
the datatype of column in datasource is TINYINT(1) that is converted to checkbox column.these checkbox
were disabled ,i enabled these in rowdataboundevent of gridview to get user feed back
|
|
|
|
|
If you don't bind on postback then I'd be checking to make sure that the viewstate is not turned off for the page.
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 ,resolved thank you sir
|
|
|
|
|
I am working on this application(asp.net 1.1,sql server 2000) that has a huge database , in the frontend there is a provision
to generate a csv file by running a stored procedure which can fetch 50000 records(approx), to acieve this I've used the
following:-
1) running forloop iterating through the dataset and creating a comma separated string, then creating the csv file, but this
process slows down the server immensely when data fetched is huge.
2) DTS packages is failing, because when I am creating a new package and click the defeine column button, the SQL Enterprise
manager just closes itself after a few seconds.
3) BCP command, sometimes works sometimes does not. The code used for running bcp in C# is :-
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo.FileName = "bcp";
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.Arguments = @"""exec ETH11.dbo.usp_DownloadInvoiceforDalkia "" queryout ""D:\NewLookLogs\Invoice.csv"" -c -t ,
-T -S";
proc.StartInfo.Arguments = proc.StartInfo.Arguments.Replace("usp_DownloadInvoiceforDalkia ","usp_DownloadInvoiceforDalkia
"+"'"+xSupplierID+"',"+"'"+xBuyerID+"',"+"'"+xFromDate+"',"+"'"+xToDate+"',"+"'"+xType+"',"+""+xCurrentOnly+","+""+xDateType+
","+""+xStatus+","+""+xAllStatus+","+""+xContentType+","+"'invoice.csv',"+"'"+Session.SessionID+"'");
proc.Start();
proc.WaitForExit();
|
|
|
|
|
I am developing an web site where i have feedback form where i am getting information from user like (Email address ,Subject, And Comment )after this on button click i want to send mail to owner of the web site. so i write code :
Dim mail As New MailMessage("txtfrom.text", "webowner@mail.com", "Txtsub.text", "txtcoment.text")
Dim smtp As New SmtpClient("localhost", 1161)
smtp.Send(mail)
When i am testing this by running from from visual studio 2005 i get error "Failure sending mail" at smtp.Send(mail).
can any one tell me what i should do .
|
|
|
|
|
do you've smtp configured? I don't think so.
Please don't forget to mark 'Good Answer', if you find it really a good one!
Kashif
|
|
|
|
|
No I haven't
will you please tell me how to do it .
|
|
|
|