|
Which thing is not working properly?
Tell whether the onmouseover event is not working.
Or The onmouseover is working but the id in the hidden field is empty. if so, then you can get the value of the hidden field in ItemDataBound event only.
|
|
|
|
|
I realize in reviewing this that there are several more caveats to it that cause this issue. I think I will cut bait here and run. Sorry.
|
|
|
|
|
Thank you Ramesh,
Actually the problem is that the hidden field value that i am trying to pass to the javascript is always showing null, but the hidden field is having the value when viewed from the source of the page from browser.
I wonder if the ItemDataBound event will allow me to add the javascript to the imgage tag.
Regards
Sujay
|
|
|
|
|
Have problem with getting check box in database checked when a current part of admin is approved or not approved here some code.
getting error with bool value
protected void ApproveAdvertiser()
{
//Add Code to add/edit/delete events (Possible case statement goes here?)
DataService ds = new DataService(int.Parse(ConfigurationManager.AppSettings["ConnStr"]));
Advertiser adv = new Advertiser();
adv.AdvertiserId = 0;
ind_approved.Checked = adv.Approver;
ds.approveAdvertiser(adv, ValuePassedIn);
Response.Redirect("Advertisers.aspx");
}
protected void BDelete_Click(object sender, EventArgs e)
{
if (RBLFunctions.SelectedValue.Equals("Delete"))
{
DeleteAdvertiser();
Response.Redirect("Advertisers.aspx");
}
else
{
if (RBLDelete.SelectedValue.Equals("Yes"))
{
//ApproveAdvertiser(true);
}
else
{
//ApproveAdvertiser(false);
}
Response.Redirect("Advertisers.aspx");
}
}
|
|
|
|
|
I don't see any meaningful code here. What is the exact error, and what line throws it ?
What are the methods you're calling ?
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 )
|
|
|
|
|
Franklinlloyd wrote: if (RBLDelete.SelectedValue.Equals("Yes"))
{
//ApproveAdvertiser(true);
}
else
{
//ApproveAdvertiser(false);
}
I agree with Christian here, not enough meaningful code to help. Show us the code that you use to actually write the value to the db.
The typical mistake however here is that you are trying to write a true/false back to the database when the database requires a 1/0 value instead (real Boolean not that fake true/false stuff ).
|
|
|
|
|
protected void Submit_Advt_Click(object sender, EventArgs e)
{
// Add Code to add/edit/delete Advertisers (Possible case statement goes here?)
switch (RBLFunctions.SelectedValue)
{
case "Edit":
EditAdvertiser();
break;
case "Delete":
DeleteAdvertiser();
break;
case "Approve":
ApproveAdvertiser();
break;
}
}
protected void EditAdvertiser()
{
// Add Code to add/edit/delete events (Possible case statement goes here?)
DataService ds = new DataService(int.Parse(ConfigurationManager.AppSettings["ConnStr"]));
int selectedEvent = int.Parse(DDLSelections.SelectedValue);
// This is LINQ to Objects, so you get to learn a little LINQ too
Advertiser Pro = (from pr in CurrentAdvertser
where pr.AdvertiserId == selectedEvent
select pr).First();
// use the evnt object to load the textboxes like this:
Pro.Name= txtadvt_nm.Text;
Pro.Company = Txtcompany_nm.Text;
Pro.Email = txtcontactemail.Text;
Pro.Phone = nbr_contactphone.Text;
Pro.OriginalComments = txtcomment.Text;
Pro.IsApproved = ind_approved.Checked;
Pro.ImagePath = txtimagepath.Text;
Pro.DateFormFilled = DateTime.Parse(dt_Date.Text);
ds.updateAdvertiser(Pro);
Response.Redirect("Advertisers.aspx");
}
protected void DeleteAdvertiser()
{
// Add Code to add/edit/delete events (Possible case statement goes here?)
DataService ds = new DataService(int.Parse(ConfigurationManager.AppSettings["ConnStr"]));
int selectedEvent = int.Parse(DDLSelections.SelectedValue);
ds.removeAdvertiser(selectedEvent);
Response.Redirect("Advertisers.aspx");
}
protected void ApproveAdvertiser()
{
//Add Code to add/edit/delete events (Possible case statement goes here?)
DataService ds = new DataService(int.Parse(ConfigurationManager.AppSettings["ConnStr"]));
Advertiser adv = new Advertiser();
adv.AdvertiserId = 0;
adv.Approver = ind_approved.Checked;
ds.approveAdvertiser(adv, ValuePassedIn);
Response.Redirect("Advertisers.aspx");
}
protected void BDelete_Click(object sender, EventArgs e)
{
if (RBLFunctions.SelectedValue.Equals("Delete"))
{
DeleteAdvertiser();
Response.Redirect("Advertisers.aspx");
}
else
{
if (RBLDelete.SelectedValue.Equals("Yes"))
{
//ApproveAdvertiser(true);
}
else
{
//ApproveAdvertiser(false);
}
Response.Redirect("Advertisers.aspx");
}
}
protected void RBLDelete_SelectedIndexChanged(object sender, EventArgs e)
{
if (RBLDelete.SelectedValue.Equals("Yes"))
{
BDelete.Enabled = true;
}
else
{
if (RBLFunctions.SelectedValue.Equals("Approve"))
{
BDelete.Enabled = true;
}
else
{
Response.Redirect("Advertisers.aspx");
}
}
}
}
|
|
|
|
|
I have some client side vbscript and I need to pass it some data from the server side code behind file. On the server side it is a text session variable. How do I pass that value to the client side vbscript?
|
|
|
|
|
Write your session variable to the script
You can use something like this in your script <%= Session("SessionVar") %>
Example:
<script type="text/javascript">
alert('<%= Session.SessionID %>')
</script>
Alexei Rodriguez
|
|
|
|
|
|
I can use a session variable in my vbscript but I get an error when I add the following line in the html to reference the code behind file.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
The error is:
The Session does not exists in the current context.
I want to use the code behind file, so how can I get this error to go away?
|
|
|
|
|
Good Evening All
I have a web Application that is compiling well with no Errors, i have Compiled each separately and worked well excluding the setup Project. i have to be honest, i once use the clean before i rebuilded the Solution and i came across this challenge. here is the Error on VS2005
http://www.vuyiswamaseko.tiyaneprope...ot_Compile.JPG[^]
And here is How my Project looks on the Solution Explorer
http://www.vuyiswamaseko.tiyaneprope...t_Explorer.JPG[^]
Thank you
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi
please please please help!
i'm writing a asp.net app that imports data from an excel spreadsheet into a sql database, i slect a excel file and iterate through each row extracting the data, it works fine from my code and on the server but when i try doing the import from any other machine i get the following error:
System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800A03EC
my code is as follows
if (filMyFile.PostedFile != null)
{
HttpPostedFile myFile = filMyFile.PostedFile;
int nFileLen = myFile.ContentLength;
if (nFileLen > 0)
{
byte[] myData = new byte[nFileLen];
string strff = Path.GetFileName(myFile.FileName);
ApplicationClass app = new ApplicationClass();
Workbook workBook = app.Workbooks.Open(strff,
0,
true,
5,
"",
"",
true,
XlPlatform.xlWindows,
"\t",
false,
false,
0,
true,
1,
0);
Worksheet workSheet = (Worksheet)workBook.ActiveSheet;
int index = 0;
object rowIndex = 2;
object colIndex1 = 1;
object colIndex2 = 2;
object colIndex3 = 3;
object colIndex4 = 4;
object colIndex5 = 5;
object colIndex6 = 6;
object colIndex7 = 7;
object colIndex8 = 8;
object colIndex9 = 9;
try
{
while (((Range)workSheet.Cells[rowIndex, colIndex1]).Value2.ToString()!= string.Empty)
{
string OrderNumber = ((Range)workSheet.Cells[rowIndex, colIndex1]).Value2.ToString();
string FullName = ((Range)workSheet.Cells[rowIndex, colIndex2]).Value2.ToString();
string[] arrayFullName = FullName.Split(' ');
string FirstName = arrayFullName[0].ToString();
string Surname = arrayFullName[1].ToString();
string CustomerID = ((Range)workSheet.Cells[rowIndex, colIndex3]).Value2.ToString();
string VoucherNumber = ((Range)workSheet.Cells[rowIndex, colIndex4]).Value2.ToString();
string Address = ((Range)workSheet.Cells[rowIndex, colIndex5]).Value2.ToString();
string CustomerCellNumber = ((Range)workSheet.Cells[rowIndex, colIndex6]).Value2.ToString();
string CustomerTellNumber = ((Range)workSheet.Cells[rowIndex, colIndex7]).Value2.ToString();
string ConsignmentNumber = ((Range)workSheet.Cells[rowIndex, colIndex8]).Value2.ToString();
string HardwareDesc = ((Range)workSheet.Cells[rowIndex, colIndex9]).Value2.ToString();
thank you in advance..
|
|
|
|
|
DotNetCoderJunior wrote: it works fine from my code and on the server
Could you explain what you mean by this, I'm taking it as it works fine through debugging against your local environment and against a server environment whilst running a browser on that server, but not when browsing from another computer against the server?
10110011001111101010101000001000001101001010001010100000100000101000001000111100010110001011001011
|
|
|
|
|
thank you for your response,Yes that i sexactly what the problem is.
|
|
|
|
|
To solve this problem do this works:
1. Create directory “C:\Windows\SysWOW64\config\systemprofile\Desktop ” (for 64 bit Windows) or “C:\Windows\System32\config\systemprofile\Desktop ” (for 32 bit Windows)
2. Set Full control permissions for directory Desktop (for example in Win7 & IIS 7 & DefaultAppPool set permissions for user
“IIS AppPool\DefaultAppPool”)
آنقدر در زندگی شکست خورده ام تا عاقبت راه شکست دادن زندگی را فراگرفتم
|
|
|
|
|
This error might be occured in different scenarios
(1) if you try to access the Excel cells which is not existis like Cells[-1,0].
(2) When you try to insert an Excel Worksheet before a worksheet and after another worksheet using the Sheets.Add() method
(3) When you write the content of a two dimentional array having some special chanracters like '=''%' in the array elements into some range of cells.
Check whether the above scenarios occured in the server side.
Also instead of using Microsoft.Office.Interop.Excel.ApplicationClass in your automation code, try to use
Microsoft.Office.Interop.Excel.Application class to create the Excel application instance.
Hope this will help you.
|
|
|
|
|
Thanx dude changing my code to Microsoft.Office.Interop.Excel.Application worked
|
|
|
|
|
I am facing the same error!
this is my code:
Dim appExcel As Excel.Application
Dim wbBook As Excel.Workbook
Dim wsSheet As Excel.Worksheet
Dim strSheetName As String
On Error GoTo 0
Set appExcel = New Excel.Application
Set appExcel = CreateObject("Excel.Application")
Set wbBook = appExcel.Workbooks.Open(txtFile.Text, False, True)
If (wbBook Is Nothing) Then
Debug.Print "Invalid workbook"
End If
|
|
|
|
|
Hi All
I have created a web application where I load controls on different callbacks. So When User click on a button "Security" I have to load a security control using ajax which works fine. The problem I am facing is the following.
in Security Control I have one javascript function say ShowDetail(){ some js code here } which is required to be called when this control is loaded. When the control loads it does nto trigger , for testing I placed a button on contrl and on click I call ShowDetail() and it says that undefined function.
on another control I have Javascript with a variable say var id = '<%=this.ClientID%>'
so when I try to access "id" variable after loading that control Javascript rasie error with id is undefined.
Can any one help me out with these issues ?
Best Regards
Rizwan Bashir
Rizwan Bashir
<a href="http://www.alm-soft.com/">ALM Soft</a>[<a href="http://www.alm-soft.com/" target="_blank" title="New Window">^</a>]
|
|
|
|
|
i made a website which is working correctly on iis 6.0 but when i shift it to iis 7.0 it gives some errors i don't know how to fix it.
the error is as below
Could not load the assembly 'App_Web_xqefcnyj'. Make sure that it is compiled before accessing the page.
i republish the site but the error remain the same
Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434
the assamblies version used in web.config is
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">;
<add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A">
amirzada
|
|
|
|
|
Member 1405179 wrote:
Could not load the assembly 'App_Web_xqefcnyj'. Make sure that it is compiled before accessing the page.
i republish the site but the error remain the same
Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434
the assamblies version used in web.config is
Dou you have installed required framework for IIS ? Did you register it with ASP.NET using aspnet_regiis?
Here is one of my complete article on IIS 7.0, this may help you .
Deploying ASP. Net Websites on IIS 7.0
|
|
|
|
|
Hi,
i am working on embedding rss feeds in my site
it has worked fine in my local server
but when i have uploaded that one in web
it shows the following error
Exception Details:-
------------------
System.Security.SecurityException: Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error :-
--------------
Line 41: {
Line 42: clrFeed.DataSource = "http://in.news.yahoo.com/myyahoo/rss/national-general.xml";
Line 43: clrFeed.DataBind();
Line 44:
Line 45: rssRediff.DataSource = "http://www.rediff.com/rss/inrss.xml";
My web.config file :-
--------------------
<location allowoverride="false">
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089">
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089">
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089">
--------------------------------------------------------------------------------------------------------------------
I dint embed the trust level tag in web.config. ( You can see the commented one )
my service provider provides medium trust level.
when i have applied trust level as medium in my web.config
it shows an error like
location allowoverride="false"
then i have changed the allowoverride to true. But its not working.
Can you please help me out in this regard
thanks in advance
|
|
|
|
|
Shared hosting servers will not allow you to change trust level higher than "Medium", you can replicate the same error on local machine by adding
<trust level="Medium" originUrl=""/> in web.config.
Sagar
|
|
|
|
|
Hi,
I am a new comer to web development,and i would like to know how IIS is configured in
Windows server 2003 for ASP.NET2.0 and how i could run the application after precompiling my project.
Plz help
|
|
|
|