|
indian143 wrote: Where rt.retro_id.Equals(retro_id)).ToList()
Wouldn't this just point back to the first record? This is just my first glance at the problem. Shouldn't there be some join between the retro table and the employer table, specifically with the retro_id field?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I have page that displays the content either in english or french. Every thing works fine with english, but when the french text is displayed I am getting script errors (expected ')'...).
I have tried the following, which did not work
CodePage="65001" (in the page directive) and
<% Response.Charset = "utf-8"; %>
Cheers
CNU
|
|
|
|
|
Can you post the code? It's hard to guess where the error is without code.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
This is how it goes
in page_load()
System.Web.UI.WebControls.Label lblHint = new System.Web.UI.WebControls.Label();
lblHint.ID = "LABEL_HINT_" + ControlID;
lblHint.Text = " ? ";
lblHint.Font.Bold = true;
lblHint.BackColor = Color.LightYellow;
lblHint.ToolTip = "Click here to see Hints about this field";
lblHint.Attributes.Add("onmouseover", "javascript:this.style.cursor='hand'");
lblHint.Attributes.Add("onclick", "javascript:alert('" + Hint + "');");
pnlInputControlsHolder.Controls.Add(lblHint);
private string MakeFieldHint(DataRow drFieldDef)
{
string Hint = string.Empty;
if (this.GetLanguageOptionCookie().IndexOf(Constants.LANGUAGE_FRENCH) != -1)
{
if (drFieldDef["AllowCSL"] != DBNull.Value && Convert.ToBoolean(drFieldDef["AllowCSL"]))
Hint += "<br />You can enter multiple values separated by ,(comma).";
if (drFieldDef["AllowWildCard"] != DBNull.Value && Convert.ToBoolean(drFieldDef["AllowWildCard"]))
Hint += "<br />You can enter full or partial values.";
if (Hint != string.Empty)
Hint = "Field Name : " + Convert.ToString(drFieldDef["DisplayName"]) + "" + Hint;
}
else
{
if (drFieldDef["AllowCSL"] != DBNull.Value && Convert.ToBoolean(drFieldDef["AllowCSL"]))
Hint += "<br />Vous pouvez entrer plusieurs valeurs séparées par des virgules (,).";
if (drFieldDef["AllowWildCard"] != DBNull.Value && Convert.ToBoolean(drFieldDef["AllowWildCard"]))
Hint += "<br />Vous pouvez entrer des valeurs totales ou partielles.";
if (Hint != string.Empty)
Hint = "Nom de domaine : " + Convert.ToString(drFieldDef["DisplayName"]) + "" + Server.HtmlDecode(Hint);
}
return Hint;
}
Cheers
CNU
|
|
|
|
|
Put a breakpoint on the assignment to the "hint" variable; it's complaining about a ")", but that should not matter much to the assignment. There's a quote too much at the end of the string, but I guess that's a copy/post error from the IDE->website.
Next, I'd suggest splitting the assignment of the hint, and adding the Server.HtmlDecode over two lines. As they're now, they're a single line, making debugging a bit harder (since you can't see the intermediate result)
Could it be that the "virgules (,)."-part of the constant string is causing the extra ")"?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
We are facing some strange issue with Sybase while using with .net application. Some time we get exceptions like below:
• Column referenced (display_name) does not exist
• Column referenced (asp_permission) does not exist
• Column referenced (ss_state) does not exist
• etc
Whereas all columns are available and it works properly, however some time its stared throwing above exceptions,
Apart from above issue , one more issue is very frequent, below is the details.
• If we are calling a stored procedure from the ASE ADO.NET Data Provider, that contains "print" statements, an AseException occurs. For example, if you call the store procedure, which contains many print statements, we will receive an AseException.
Below are the steps we follow to use Sybase 15.7 with ADO.Net :
1. We upgraded our Sybase database from Sybase 12.5.1 to Sybase 15.7.0
2. We are using Sybase ADO.Net Driver of Sybase “Sybase.AdoNet2.AseClient” with Version : 2.155.1015.0 Runtime version : v2.0.50727
3. We are using this assembly from Global Assembly cache.
4. Platform for application in Development :
• Windows XP 32 bit,
• Microsoft Visual Studio .Net 2010
• .Net Framework 4.0
• Sybase Client 15.5
5. Platform for application in Test Server :
• Windows Server 2008 64 bit
• Microsoft Visual Studio .Net 2010
• .Net Framework 4.0
• Sybase Client 15.5
6. When we run database in Compatibility mode with Sybase 12.5.1 its works fine.
|
|
|
|
|
Chances are that this is a Sybase-specific problem. Have you tried their forums/support?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hi Eddy,
Thanks for reply.
I have posted to lot of Sybase forums as well. still did not get any reply
Regards
Hirdesh
|
|
|
|
|
Still nothing?
If it looks like there's "little to no support", then it might be wise to consider a different database-provider.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Hi All,
I have an ASP.Net applicaiton in which I am using Entity Framework, I have a table (table1) which is referencing two of its columns from two different tables (table2 and table3). When I am trying to load table1 from entity frame work its not loading the values of table2 and table3. I know I have to put include in Linq statement but I am not sure how to handle for the two foreign keys. How can I put the Linq to handle two foreign keys.
Is there any separate way to get handle two Foreign Keys the Entity Framework.
Please help me in accomplishing this task, its an urgent requirement.
Thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
modified 7-Sep-12 3:44am.
|
|
|
|
|
indian143 wrote: its an urgent requirement.
We're volunteers, it ain't important to us.
indian143 wrote: I know I have to put include in Linq statement but I am not sure how to handle for the two foreign keys.
Not an include, but a JOIN statement[^].
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I have several asp:GridView in my project. How can I group common functionality such us...rowEditing etc
|
|
|
|
|
byka wrote: How can I group common functionality such us...rowEditing etc
Mostly, you cannot group them as each edit will have their own logic and queries. If you can try to make it close to generic if you have a similar structure.
|
|
|
|
|
What u really want to do with gridview ?
|
|
|
|
|
in asp.net.. in Gridview i created "Download" and "View" Button field.. how can i view the pdf file when i click ti view button as well as how can i download when i klick this download button..
|
|
|
|
|
hammathMuneerul huda wrote: how can i view the pdf file when i click
hammathMuneerul huda wrote: how can i download when i klick this download button
No need to provide two separate links. Single link 'View', on click of which you need to launch the file with Process.Start , it will automatically prompt a dialog asking to Open or Save it. User can do whatever they want.
Process.Start("filePath with name");
P.S.: Next time avoid making the whole question bold.
|
|
|
|
|
i am developing a project in which admin uploads the testimonials in database.
for this i have created a table in database and testimonials are stored in column "descr" of table "test".
now i want to fetch all the testimonials one by one on the home page in a marquee.
i am able to retrieve only first id value means only one testimonial in a marquee, but i want to upload all the testimonials one after another in a marquee.
can anybody please help
Jasbeer Singh
.Net Developer
|
|
|
|
|
|
thankx, but i want coding for that, i have tried this. but can u please provide coding for this
|
|
|
|
|
Jasbeer Singh wrote: but i want coding for that, i have tried this. but can u please provide coding for this
No. No one will provide full code to you.
You need to try by yourself. Try out and post specific issues if you face any.
|
|
|
|
|
thanks i am almost done.. but am not getting more than one testimonial in a marquee, i am getting only one and rest are not displayed in marquee.
|
|
|
|
|
Am trying to make a map with markers , the lat and lng are stored in mdb file , but I want also to display the markers with the name of the location in a GridView1, but whatever am doing is not working , this is what I have tired till now... so can anyone help plz ?
function initialize() {
if (GBrowserIsCompatible()) {
var gmarkers = [];
var gicons = [];
var baseIcon = new GIcon(G_DEFAULT_ICON);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.iconSize = new GSize(20, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);
function createMarker(point, name, html, category) {
var marker = new GMarker(point, gicons[category]);
marker.mycategory = category;
marker.myname = name;
GEvent.addListener(marker, "click", function () {marker.openInfoWindowHtml(html);});
gmarkers.push(marker);
return marker;
}
function show(category) {
for (var i = 0; i < gmarkers.length; i++) {
if (gmarkers[i].mycategory == category) {
gmarkers[i].show();
}
}
document.getElementById(category + "box").checked = true;
}
function hide(category) {
for (var i = 0; i < gmarkers.length; i++) {
if (gmarkers[i].mycategory == category) {
gmarkers[i].hide();
}
}
document.getElementById(category + "box").checked = false;
map.closeInfoWindow();
}
function boxclick(box, category) {
if (box.checked) {
show(category);
} else {
hide(category);
}
makeSidebar();
}
function myclick(i) {
GEvent.trigger(gmarkers[i], "click");
}
function makeSidebar() {
var html = "";
for (var i = 0; i < gmarkers.length; i++) {
if (!gmarkers[i].isHidden()) {
html += '<a href="javascript:myclick(' + i + ')">' + gmarkers[i].myname + '<\/a><br>';
}
}
document.getElementById("side_bar").innerHTML = html;
}
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(53.8363, -3.0377), 11);
var markers = document.getElementById('<%= GridView1.ClientID %>');
for (var row = 1; row < markers.rows.length; row++) {
for (var col = 0; col < markers.rows[row].cells.length; col++) {
if (col == 0) {
if (document.all)
var heading = new markers.rows[row].cells[col].innerText;
else
var heading = new markers.rows[row].cells[col].textContent;
}
if (col == 1) {
if (document.all)
var terrnaam = new markers.rows[row].cells[col].innerText;
else
var terrnaam = new markers.rows[row].cells[col].textContent;
}
if (col == 2) {
if (document.all)
var lat = new markers.rows[row].cells[col].innerText;
else
var lat = new parseFloat(markers.rows[row].cells[col].textContent);
}
if (col == 3) {
if (document.all)
var lng = new parseFloat(markers.rows[row].cells[col].innerText);
else
var lng = new parseFloat(markers.rows[row].cells[col].textContent);
}
if (col == 4) {
if (document.all)
var address = new markers.rows[row].cells[col].innerText;
else
var address = new markers.rows[row].cells[col].textContent;
}
if (col == 5) {
if (document.all)
var category = new markers.rows[row].cells[col].innerText;
else
var category = new markers.rows[row].cells[col].textContent;
}
else
if (document.all){
var str = new markers.rows[row].cells[col].innerText;
var point = new GLatLng(lat, lng);
html = terrnaam + ' ' + address;
var marker = new createMarker(point, name, html, category);
map.addOverlay(marker);
}
}
show("terreinen");
show("gebouwen");
makeSidebar();
}
}
else {
alert("Sorry, the Google Maps API is not compatible with this browser");
} }
</script>
terreinen:
gebouwen:
|
|
|
|
|
Hi
i have a fileupload control in form, and now i want to check the size of file before upload it. i wrote this code but the value of fileSize = 0 all the time. what should i do. can anybody help me?
int fileSize = fuSignature.PostedFile.ContentLength
|
|
|
|
|
Please do not cross-post. You've already posted this in the C# forum.
|
|
|
|
|
I would like to share sample program regarding files clean up on Browser close button.
1.Include below script
<script type="text/javascript">
$(document).ready(function () {
$(window).unload(function () {
if (event.clientY < 0) {
$.ajax({
type: "POST",
url: "Default.aspx/Cleandir",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: true
});
}
});
});
</script>
2. In code behind, create method using [WebMethod]attribute.
[WebMethod]
public static void Cleandir()
{
try
{
DirectoryInfo dirinfor = new DirectoryInfo(@"C:\Users\Desktop\image");
if (dirinfor.Exists)
{
FileInfo[] filename = dirinfor.GetFiles();
if(filename!= null)
{
if (!(filename.Length.Equals(0)))
{
foreach(FileInfo f in filename )
{
File.Delete(f.FullName);
}
}
}
}
}
catch (Exception ex)
{ }
}
}
Basically web method is being called using Ajax in jquery when user clicks on Browser close button.
Thanks,
Ashwani Kumar Vishwakarma
From Jabalpur
|
|
|
|