|
this is the code i am using
BloodUnit.Number when i give enter in textbox the page getting posted
i dont know y this is happening ?
Any one Give me a Solution....
sathimailin
|
|
|
|
|
The code lines you have given is ok there is no problem in it can you give me whole code between tag
Best Regards,
Chetan Patel
|
|
|
|
|
Thanks for taking this issue.
sathimailin
sathimailin
|
|
|
|
|
Hi friends..
Can anyone give me the code to generate random numbers in javascript..?
Pls do the help at the earliest..
Thanks & Regards,
Balaguru
|
|
|
|
|
check the Math.random() funtion
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
hi,
i have a some datagrids in my web based application, and want to convert them to the new Telerik RadGrids.
Initially, i just changed the ID of the Telerik grid to the id of the old datagrid, but that gives me an error stating, that it cannot convert.
can anyone advise me on the subject
thanks
|
|
|
|
|
Hi all,
I am using Asp.net , C# Visual studio 2005.
I want to export data that contains images and textual data to word.
Please give me some useful link ……
Thank you.
imran khan
|
|
|
|
|
You have to use Graphics object to write to the .doc file it provides different method to write to word document.
Use following link
http://www.codeproject.com/aspnet/wordapplication.asp
Best Regards,
Chetan Patel
|
|
|
|
|
I am using AutoComplete control in AJAX. I have following method in my web service. But it is giving me following error
Cannot implicitly convert type 'string[]' to 'string'
[WebMethod]
public string FindEmails(string prefixText, int count)
{
ArrayList filteredList = new ArrayList();
String constr = System.Configuration.ConfigurationManager.ConnectionStrings["MySqlServer"].ConnectionString;
SqlConnection objConn = new SqlConnection(constr);
SqlCommand objCmd = new SqlCommand("SELECT Emails From t_Users", objConn);
SqlDataReader objRdr;
string[] str;
str = new string[12];
int x = 0;
int i = 0;
objConn.Open();
objRdr = objCmd.ExecuteReader();
while (objRdr.Read())
{
str[x] = Convert.ToString(objRdr.GetValue(i));
x = x + 1;
i = i + 1;
}
foreach (string name in str)
{
if (name.ToLower().StartsWith(prefixText.ToLower()))
filteredList.Add(name);
}
return (string[])filteredList.ToArray(typeof(string));
}
seema
|
|
|
|
|
method FindEmails have to return array string instead of only string
public string[] FindEmails(string prefixText, int count)<br />
{<br />
.<br />
.<br />
.<br />
.<br />
}<br />
I Love SQL
|
|
|
|
|
Hello,
I work in a mutinational company that allocates http://myCompany/myCountry/.... for my web applications.
I develop an ASP.NET 2.0 app that works OK when run at http://myHost/myApp but when moved to the company's server (http://myCompany/myCountry/myApp) it fails to load some ASP.NET javascripts that the framework needs.
I'm talking about the javascript framework code that performs postbacks, event validation, etc. So the page doesn't work.
Looking inside the generated HTML, I find scripts references to
<script src="/MyApp/WebResource.axd?d=cgvtpYkUMiZVT5qyFbc_EA2&t=633167444770355332" type="text/javascript"></script><br />
So the browser, to load this javascript from ther server, prepends ONLY the hostname to the src value, and requests
http://myCompany/myApp/WebResource.axd?d=cgvtpYkUMiZVT5qyFbc_EA2&t=633167444770355332
instead of
http://myCompany/myCountry/myApp/WebResource.axd?d=cgvtpYkUMiZVT5qyFbc_EA2&t=633167444770355332
Everything would work (both in my computer and in the company host) if the reference were relative:
<script src="WebResource.axd?d=cgvtpYkUMiZVT5qyFbc_EA2&t=633167444770355332" type="text/javascript"></script><br />
But I don't know the way to modify the output code that ClientScriptManager class generates. For example, if I would know under which type / key this script is generated, I could be able to register another Script include for that type / key in the ClientScriptManager, overriding the first one. But I don't know how to find it. I cannot debug into the class (or I don't know how to do it)
Anybody can help me ?
Thanks in advance
Carlos
|
|
|
|
|
I'm designing like a shopping cart and have a product list which is an xml file consisting of products and prices which is loaded into a dataset then bound to a datagrid
There are buttons next to each product by clicking one of these should direct the user to another form showing the choice of product and price in textboxes.
I can load 1 selection like the example in the code below for Jam Doughnut fine into the textboxes on the 2nd form but can't load any others depending on the selection, the rest of my code is below
1st form code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Set the path of XML file and schema
Dim strPath As String = Server.MapPath(".")
' Declare a dataset
Dim dsProducts As New DataSet
' Apply the XML schema to the dataset
dsProducts.ReadXmlSchema(strPath & "\Products.xsd")
' Read the XML into the data set
dsProducts.ReadXml(strPath & "\Products.xml")
DataGrid1.DataSource = dsProducts
DataGrid1.DataBind()
End Sub
Private Sub btnJam_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnJam.Click
Session.Item("Product1") = JamDoughnut
Session.Item("Price1") = 0.40
Server.Transfer("order.aspx")
2nd form code so far in load event procedure
txtdescription.text = "Product1"
txtprice.text = "Price1"
Any advice would be appreciated
Thanks in advance
Simon
SIMON GOUGH
|
|
|
|
|
First piece of advice. Check how you are holding your session variables. If you are using In Process, this limits your application to single processor single servers.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I'm trying to use session.item to do this, I'm relatively new to ASP.Net so just need some advice on how to go about loading the session variables depending on the selection made on the first form
Thanks
SIMON GOUGH
|
|
|
|
|
txtdescription.text = Session["Product1"].toString();
txtprice.text = Session["Price1"].toString();
Best Regards,
Chetan Patel
|
|
|
|
|
Chetan many thanks for your help
That works in terms of loading 1 value but I have 5 buttons, depending on which one is clicked should load the relevant info in the textboxes on the 2nd form, I will have to create session variables for all these, do I have to use a select case to get this to work, any advice would be appreciated
Thanks again
SIMON GOUGH
|
|
|
|
|
helo all...,
i have make register and display in formview(insert mode) with usesqlsource1. when customer register a same userid, the error is
"Violation of PRIMARY KEY constraint 'PK_user'. Cannot insert duplicate key in object 'dbo.user'.
The statement has been terminated."
now i want to change that error, i put a errorlabel. i want errorlabel show "sorry, your id has been use.please use other id."
my code is:
Protected Sub SqlDataSource1_Inserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceStatusEventArgs) Handles SqlDataSource1.Inserted
Dim label As Label = Me.FormView1.FindControl("label1")
If Not e.Exception Is Nothing Then
label.Text = "sorry, your id has been use.please use other id."
e.ExceptionHandled = True
End If
End Sub
the label is not show anything when i insert two same userid..
which is wrong?
plss.. help...
|
|
|
|
|
1. be sure that you can find control named label1 in FormView1
2. be sure label1 is visible = true (if exists in FormView1)
I Love SQL
|
|
|
|
|
thx for ur information...
but if i take that label outside formview, it can show errors.
but in formfiew, it seems hidden, although it visible is true..
i have use findcontrol("label1") to detect label, but it can not show too..
is there can not take in formview? must outside formview?
|
|
|
|
|
try to loop controls in formview1 in debug mode and be sure that label1 exists on formview1. if label1 exists it should displayed.
I Love SQL
|
|
|
|
|
Hi all...
I have a vcalendar (.vcs) file, which is actually an outlook meeting file which I contruct through StreamWriter in .net. I provide a link to download it, and it is downloaded perfectly in Internet Explorer. But when i try to download it in Firefox its content is opened in browser. I want a way to download it in Firefox as well.
Please note that this file can also be opened in a text Editors like MS word, wordpad, Excel etc etc...
Waiting for response.
Bye
|
|
|
|
|
Make sure you set the mime type of the file, IE probably works it out for itself.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
How can i define the mime type ..
Please give me the hint. for example if i use streamwriter to in a txt file, how can i define it as .txt. By the way i append .vcs in the link which downloads the file and also in the file appending "PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN"
thx
-- modified at 10:18 Sunday 9th September, 2007
Bye
|
|
|
|
|
If you're sending the file with a response.Write, then the Response object is also used to set the MIME type. If you're not, how are you doing it ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am using the streamwriter to write the file.
In start....
l_strFilename = Server.MapPath("../../" + MZKBase._SysGenExcelFilePath + l_strGuid & ".VCS")
Dim l_oWriter As System.IO.StreamWriter = New System.IO.StreamWriter(l_strFilename)
l_oWriter.WriteLine("BEGIN:VCALENDAR")
l_oWriter.WriteLine("PRODID:-//Microsoft Corporation//Outlook MIMEDIR//EN")
l_oWriter.WriteLine("VERSION:1.0")
l_oWriter.WriteLine("BEGIN:VEVENT")
l_oDueDate = TimeZone.CurrentTimeZone.ToUniversalTime(l_oDueDate)
l_oString.Append("DTSTART:")
l_oString.Append(AppendZero(l_oDueDate.Year.ToString()))
...Rest of the File...
l_oWriter.WriteLine("PRIORITY:3")
l_oWriter.WriteLine("END:VEVENT")
l_oWriter.WriteLine("END:VCALENDAR")
l_oWriter.Close()
And in the end
l_oString = New Text.StringBuilder
l_oString.Append(" Save As ")
To show the link saveas...
Bye
|
|
|
|