|
drpSettingsCountry.SelectedValue = "US"
in your code behind.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have an existing custom control. I have added a new DropDownList control on it. I try to bind the data from to dropdownlist within an overriden CreateChildControls method thats been called on OnInIt event of custom control.
When I try to bind an datatable of <b>my typed data set</B>, it skips out of the CreateChildControls function at on line no. 4 of the following logic
1. director.DataAccess.PopulateDataSet();
2. ddlLocation = new DropDownList();
3. ddlLocation.ID = LocationID;
4. ddlLocation.DataSource = director.DataAccess.DataSet.WO_Location_List;
What might be the reason? Is some thing wrong with the dropdownlist control OR there is some issue with TypedDataset data for that dropdownlist?
Note: This databinding logic works absolutely fine with other dropdownlist controls on a different custom control
Regards,
Vipul Mehta
|
|
|
|
|
I think oninit is too early to databind to a control. Why are you doing it so early ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I got this sorted out. Infact the DataType of one field in my select query & the datatable did not matched. As soon as I fixed it out it started working as expected.
Regards,
Vipul Mehta
|
|
|
|
|
Im converting Datatable to excel like this way
Response.Clear();
Response.ContentType = "application/vnd.ms-excel";
string sep = "";
foreach (object column in Columns)
{
string[] value = column.ToString().Split(',');
Response.Write(sep + value[0]);
sep = "\t";
}
Response.Write("\n");
foreach (DataRow dr in dt1.Rows)
{
sep = "";
for (i = 1; i < dt1.Columns.Count; i++)
{
Response.Write(sep + dr[i].ToString());
sep = "\t";
}
Response.Write("\n");
}
Response.End();
it converting fine but i would like to format the excel how's that possible. Thanks in advance byee
|
|
|
|
|
Make a comma the seperator, Excel will hopefully open as a CSV
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Create a CSSclass
and then add data with mso-number-format:....
in the css class.
More Info to be found here[^]
We style Date Fields with MSo-Number-Formatting via a static class
public static void styleDataTable(Table table)
{
foreach (TableRow row in table.Rows)
{
foreach (TableCell cell in row.Cells)
{
if (IsDate(cell.Text))
{
cell.CssClass = "tdDate";
cell.Width = Unit.Pixel(80);
}
}
}
}
In the DataTableToExcel Page we place in code behind:
Sesame.styleDataTable(htmlToExport);
(htmlToExport is a created Table based on the datatable)
|
|
|
|
|
thanks to both of you, i fixed the style by putting the data into html table and then wrote it in repose object, it was easy
thanks again
|
|
|
|
|
I have to send an email which should have company logo at top of the body and then some texts.
when i'm doing so at the receipent its not displaying any image at all
can anybody give me solution to this question asap......as its urgent
thanking u
Russel
|
|
|
|
|
do you understand what email is and how it works ? It's a text only format. Some mail programs can show HTML mail, but the image needs then to be on a public server in order to be visible.
How are you embedding it ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have asp panel inside a div, and i have done drag and drop other images (eg house, tree,etc).
Now i need to save the asp panel as an image in the format .jpeg or .bmp
Does anyone have solution to my problem.
|
|
|
|
|
hi
i am using master page and want to use java script validation on its content page but it is not working
master page code
<script language="javascript" src="<%= Request.ApplicationPath %>/regrsitValidation.js"></script>
.js file coad
function fnsFieldValidation()
{
if(document.getElementById.("dd1_dep_fabric").value=="--Choose Category--")
{
alert("Please Choose Category.");
document.getElementById("dd1_dep_fabric").focus();
return false;
}
}
and submit botton code
<asp:Button ID="Button1"
runat="server" Text="Save" OnClientClick="return fnsMakeFieldValidation('form1');" />
krishna veer singh
|
|
|
|
|
what is the errormessage?
if(document.getElementById.("dd1_dep_fabric").value=="--Choose Category--")
if this is the exact code you are using, remove . after getElemenById
and ifyou are having the dropdownlist int he content page, it must be prefixed with something like "ctl00_" . use this name in getelementbyid functional call as object name...(check HTML source by right clicking in browser window and select view source....and then look for the name for the control there )
hope it helps
Ashish Sehajpal
|
|
|
|
|
no error is giving but that validation is not firing
krishna veer singh
|
|
|
|
|
what is the errormessage?
if(document.getElementById.("dd1_dep_fabric").value=="--Choose Category--")
if this is the exact code you are using, remove . after getElemenById
and ifyou are having the dropdownlist int he content page, it must be prefixed with something like "ctl00_" . use this name in getelementbyid functional call as object name...(check HTML source by right clicking in browser window and select view source....and then look for the name for the control there )
hope it helps
cheers !
Ashish Sehajpal
|
|
|
|
|
have u checked the clientid of the control i.e. dropdownlist ?
Ashish Sehajpal
|
|
|
|
|
Hi all
i was downloaded the mathml control and alrady added on my page for entring mathmatics equations on my webpage, its woking fine but i have no knowledge how to use that control. I want to save that equation into the database and use that for displaing also but i dont know how to do the same.
Plz do reply
Yogesh Agarwal
|
|
|
|
|
Hi all!
I am indexing Russian text with that code. I have a problem, when I try to search for words in different cases.
Search is productive, only if the word is in the same form, as in the initial (indexing) text. Help me please.
(Whether there can be it because Words in RussianStemmer.cs are stored in the coding KOI8-r?)
versions: Lucene.Net 2.0.0.4, Snowball.Net 2.0.0.1
using System;
using System.Collections.Generic;
using System.Text;
using Lucene.Net.Documents;
using Lucene.Net.Index;
using Lucene.Net.Analysis.Snowball;
using Lucene.Net.Search;
using Lucene.Net.QueryParsers;
using System.Text.RegularExpressions;
using Lucene.Net.Analysis;
class Program
{
static void Main(string[] args)
{
string index_path = @"D:\index\";
System.IO.StreamReader reader;
reader = new System.IO.StreamReader(new System.IO.FileStream(@"d:\source\67165.html", System.IO.FileMode.Open, System.IO.FileAccess.Read), System.Text.Encoding.Default);
reader = new System.IO.StreamReader(reader.BaseStream, reader.CurrentEncoding);
String title = Regex.Replace(reader.ReadLine(), "<[^>]*>", "");
String fullText = Regex.Replace(reader.ReadToEnd(), "<[^>]*>", "");
Document doc = new Document();
doc.Add(new Field("message_title", title, Field.Store.YES, Field.Index.TOKENIZED));
doc.Add(new Field("message_text", fullText, Field.Store.NO, Field.Index.TOKENIZED));
Analyzer a = new SnowballAnalyzer("Russian");
bool create_key = true;
IndexWriter iw = new IndexWriter(index_path, a, create_key);
iw.AddDocument(doc);
iw.Optimize();
iw.Close();
String query_string = "??????";
Search(query_string, index_path);
query_string = "??????";
Search(query_string, index_path);
query_string = "???????";
Search(query_string, index_path);
query_string = "????????";
Search(query_string, index_path);
Console.ReadKey();
}
static void Search(string query_string, string index_path)
{
Searcher search = new IndexSearcher(index_path);
Analyzer a = new SnowballAnalyzer("Russian");
QueryParser parser = new QueryParser("message_text", a);
Query q = parser.Parse(query_string);
Hits hits = search.Search(q);
string[] result = new string[0];
if (hits.Length() > 0)
{
result = new string[hits.Length()];
for (int i = 0; i < hits.Length(); i++)
{
result[i] = hits.Doc(i).GetField("message_title").StringValue();
Console.WriteLine("\n{0}. {1}\n", i + 1, result[i]);
}
}
else
{
Console.WriteLine("\n Missing Search!!!\n");
}
}
}
Russian text example (for indexing):
"?????? ???????? ? ?????? ????????? ??????? ?????????
radiomayak.ru
?? ? ??????. ??????? ?????? ??????? ?????? ????????. ???? ???????, ???? ?????????. ?? ???? "?????" ?? ???????? ??????? ??????????? ????????????? ????????????? ??? ??????? ??????.
??????: 25 ????? ?????? ???????? ?? ?????? ??????? - ??? ?????? ?????? ?????? ? ?????? ?????????????, ??????????? ?????? ???????, ?????? ??? ?????? ?? ???????? ??????? ? ???????? ??????? ????.
? 11:40 ?? ?????? ????????? ????????? ?????????? ? ???, ??? ???????????? ? ???? ???????? ???? ????????? ??-??? ?????. ?????? ????????? ??????? ?????????. ? 12:30 ?? ?????? ??????? ???????????? ????? ?????? ?????????? ??? ????????? ???????????? ?????? ????????."
forum
|
|
|
|
|
I need best date picker tool for my web application to check in and check out the dates. i searched a lot in google but i cant find till now...
Note: the check out date should change dynamically as per the check in date... Please help me...
Gopinath.R
|
|
|
|
|
Hi ,
I don't know whether it will fulfill your requirement or not, but this is good calendar. And it is in javascript.
Here[^]
Regards
|
|
|
|
|
AJAX toolkit has a calendar extension. You can use that.
|
|
|
|
|
you can create your own control with your specific functionality by extending the AJAX toolkit calendar control...
it is bit easy even for a newbee...
you can even put the checkpoints on date_change event to check for the start date and validating the end date or restricting the selection criteria of end date...
ask help if needed...
cheers !
Ashish Sehajpal
|
|
|
|
|
am using the excel 2000.
In c# , i am writing the following code.
Excel.Application xls = new Application();
xls.Workbooks.Open(path);
But the second code line is giving error
No overload for method 'Open' takes '1' arguments
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=796937&SiteID=1
I visited the site
The site also mentioned one parameter ,
Please help.
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
hai frnds
i m developing a web portal in asp.net 2.0
in a page i set the property "AutoPostBack=True" for so many controls
say 8 controls i set that property
is there any disadvantage for this property...
i mean that so many times , the page is post back to it self..
is there any problem with it...
what happens when a page is post back to itself so many times ...
plz sen reply ....
thanks in advance
vijay
devulapally_vijay@yahoo.co.in
|
|
|
|
|
vijaylumar wrote: is there any disadvantage for this property...
nothing. Each time your server will get a hit and it has to do the processing, also user has to wait till the page posts back.
|
|
|
|