|
try this MaintainScrollPositionOnPostback="true" in page directive
Coding C#
www.excitetemplate.com
|
|
|
|
|
Hi to all,
I am working on asp.net web application. In this there is a module "video gallery". It should be database driven. I did this by using a flash player. Everything was working fine in the development enviroment ie on localhost. When I uploaded it to the server, the flash player is not visible on the page. Then I checked the "view source" and the control is something like this:
<br />
<div id="FlashVideo1"><br />
<input id='FlashVideo1_objectHasPlayer' name='FlashVideo1$objectHasPlayer' type='hidden' value='false' /><script type="text/javascript"><br />
activex_direct_inject('ŷŻǂƸƠƏƐƓŽŬƛŶſŮźƁƝŽŬżſŬƹƻƨƺƹƷǁŧǀǁǂǀǁǂǀǁǂǀǁǂǀǁŬſůǂŷŽǂƣǁƻƚŵƁŭŹƌŷŽŽűưƃűſŸŻžŮƘƀůƐŵƁŧżŰƹƦǂǀǁǂǀǁǂǀǁǂǀǁǂŷŻǂƸŽųŽŬŵŻųŮƲźŽŬƜŶŻŴŽŲŭƠŧƘžǀƻƼǀŽųŽŬŵŻųŮƲźŽŬƜŶŻŴŽŲŭƠŧƘžƸŸžƷƸǂǀǁǂǀǁǂǀǁǂǀǁǂťǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂżŲſūŴŽŲŭƴŹżŮƛŵŽųżŴŬƟũƗŽƺŷŽƹƲūƁŴŬŽǀƤǂƹŭŰūżƻƥǁǂǀǁǂǀǁǂǀǁǂǀǁťƟžŮŷūŽƈƂƞŷůŽŽŭƃƛŴƀŻŽƺƹƛŶſŮźƊŸžŻŲƱƹƵǀÖòĥĕĝĘēĤØĞęòÙøĞĐĪğĊĝĘĖĠâĕĜĢĔĦě×ÐįĞęĩĚïÙäççÛÔĜĖĚĘĞĪóÚçãà×ØĩĮĥėïÙĐħħĠĝėĒĥĚĥĤåīàĦĘğěĠĬĖĨėßĕģĘħĜÛÑĕĒĪėóÚěħĤĠòääĬĩĩàēĜİħĝâĔĠĞäėīâĊĘĒĂĝĨĤĪĤĕėÝĘįĘóĘî÷ěĦĥċùċāöęèāÿûõĞĥãøĝĎëĭĖēăĐČéĊäàĔöċħģăýĤýĠøúćĕøěåéĥ÷ģćėĉđħıëĜýĆèĖğāİīĬĈĄīĀİĂāĭýěñåħûæûâīĨąĪĎćþĞäĔėĀĨāăčĘĩąąæÛĖğĢíģôíççìåèáîîçäèéçâíååÜÒðÒëħĘĦĕġÑğĒģěóÚĠĢĦęĝÜÕīēĞħĔôÞĜĨĨġëàåĭĭĪáėĕĩīĞãĘġğàĐĬæċęĖăĖĤĥīĨĖĘáđĨĜôęòøĜĢĞČýČĂúĚáýĀüùğĦçñĖĒìĮĚĔĄČąêĎåáĘ÷ĄģĤĄāĥþĤñóċĖùğæêġðĤċĘĊĕĨĪçĝþĊéėģúĩįĭĉĈĬāĬûĂıþĜõæĠ÷çüæĬĩĉģćċÿğèĕĘüġĂćĎęĭĆþâÜėģģîħíæëèíééâêçèèéêëãæáæÝÖâñÓìĠęħĖĢÒĠēĜĜôÛĚĠĒĤęĬėĨĦÚÓĦđĤĪĚòÙēĥğĥĜĨĚĠĒĤęĕęĥġħĥğĜāùòûĞēĥėčĠĘęģâ×ĒģĦñôğğğħþĪġġąĕĤĔĜĥñĨĦĦĖ×ėģĦîôĨĤğĈġĖĮïĦĤĤĜÝĕġĤìóĦĜĜěĥćĜĝĕõêÛĖğĢíøĤĘěęĉăýîÜėģģîĆēđĤĚĂĤĖėïĢīĩęĨėęĥĠĜğĪÙĔĠĠëċĝĤĬõġĠģĩĦĠĄĕğĖĝóĪĨĨĘÙđĝĨðĈĠěĠćāăôÙæĚĈĖēĈěĩĢĨĥēĕæĖĭę×åĘēÜêĘúĞġĠĆüĎĄùĜãüúþøġĨæóĘĉîİęĖĆċćäčçãėùĆĢĞĆĀħĀģóõĂĘûĞèìĠòĞĊĚČĔĪĬæėĀĉëĬĜđúðĖĜõĥħĄĕûĎèĦĦČæěāĨĝêĜëēĦĥçäċæëĥĆâīøĮëæĢáÕêëĩÚåĖèâêïèëäééâçëìêåèààÞĖĢĥíĈěēĜĦĉĆĀîęĥĪĦÛæĔØâĖÝçěĬĩĩàēĜİħĝâĔĠĞäėīØåęĆęĜĚĤĨ×äĘĢğĠĪĕâėĝħÜėģģîĉğĜĭĢĚòãââÕĘĤĤïÛÑàïÖòĦĔĥĔĝÐĦĖĢĚïÙģĤĘģĝĨĭØÑħėĢīĘðÚĘęğĝÜÕáðÒëħĘĦĕġÑğĒģěóÚĦĖđĜĝÜÕīēĞħĔôÞĢģħĔĒĝěÝÖâñÓìĠęħĖĢÒĠēĜĜôÛĕĠĝĠĨĩęĨĜģħđēěĚĨĨÙÒĨĐģĬęñÛĒĝĨėįĩÚÓâîÐôĥĖħēğÒĝĘĤęñÛĨĞĠĚěÝÓĩĔĜĥĝòÜĤĢēģĤĜÞÔãòíġĒĨėģÓġĔĝĕõÜĢĚĠħÙÏĭĘĠĩęîØĥĨīěÚÓâîìĨĖħĖğÒĠĐĤĜñÛĕĝĝĠĭüīğğĆēĢĝĚģÜÒĨēěĬĜñÛĨģĦĖÝÖåñïâğĒĢĚĘĩðîēÏğĩęĚñØęĥĪĦðââĪħħæĖĨĥĠėĦĕģĘħĜĪĚĕĖĥäęĢĠâđģĨģĚĩĘĞēĢğĭĝĘęĠĐāīĨęěĔĦĕďĄĞĘĚĠĥėÝĘĪĤĬÛÑĥĚĪĢěðÚôăĀĆĚĩûĞēĥėčĠĘęģÑąģğėĢÚÓĦĤĩĤĚòÜĨěĥĘęĠĠĝĨĪëħğĩğĕğĘëğĮĚħěĞġĩé×ĭĝħĝēĝĖñÖĦĢĦĜĤęħģïħėĞēģĠĭęïÔīÞĚĤĚěīíäâçêðÕīěĥěđĠģĝĨĭëħĚĩğĘğĘîÐĔġĨĥġēīìđģĦėğïØïÑòĘĨÓâñìęĥĜÕĨĤĕïÖæĎęĖĆĖĤĠīĨęĘáĔĨĔ÷ęòûĜĢġĄýďĂúĝáýûüùĢĦçôĖĊïĮĚėĄČĈâĎèáĘúĄģğĄāĨþĤôóăęùğéêġóĜċěĊĕīĪçĘþĊìäÿêôñĥĘĞĭâğöĢğéĢĩíôĨĀĊüĠĝĢèĩĕĚĖöüĤĕĀáĘĉĪćĬĦĊãāíĨĥ÷öďåĐìĥîĖę÷ħĦÿåĤþåğīĦĞíĈčĔĥħåêĆùāğĚôøéÚĨñçääîêíãëëááíëìççââÖ×ęģĦĘĖģîÝæÝÓâñìßęóƿƹƥŭŰŧŦūŷųžűŪƴƚŵƁŭŹƌŷŽŽűưƃźŵƁŭŹǂƣǁơƍƑƔŻŭƜŴƀůŸƳƜŷųžƚŵƁŭŹƕűūŹŻƹƻƚŵƁŭŹƌŷŽŽűưƻƷƦǂƟƎƒƒżŮƓżžŷƀƴƚŵƁŭŹƌŷŽŽűƒƀŶżſŬŮƇƹƛŶſŮźƊŸžŻŲƱƹƄǂƣǁŴŻŪǂƟƎƒƒżŮƓżžŷƀƴƚŵƁŭŹƌŷŽŽűƑŰűŭųƸƺƜŴƀůŸƋŹżżųƯƺƹƥǁŹźǁƺƿƠƏƐƓŽŬƛŶſŮźƁƝŽŬżſŬƹƻƧƺƹƷǁŧǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀƠƏƐƓŽŬƛŶſŮźƲƛŹŲŽƜŴƀůŸƔųŪŸŽƸƺƜŴƀůŸƋŹżżųƯƺƹƲŽƁŬƀƥƹƲƋŻſƐŻŮųūůſŻƳƁŨŽƣżƤƜŶűųƋƛƊƒƛŹưƕƘƚƞŶŭƭơźƇƫŧżƀƎƇƌƭƊƱƳŽƜƍůŴƒƖŰƕŰơƝƎƁƜŷƮƨŲơųƍžƊƀūŧƫŻƘƍƬżűƘŧŪŪƌƎŨƑŧƖƕŧƘŸƠƭűƛƱƞžũƛſƁƆƂŵƕŽƕƖſŴŶƂƀƜưƘƛưƼŬƤƬƭƮƪƬƪƲƨƩƱƯƬƬƩƯƭưƱƻƥǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁơƍƑƔŻŭƜŴƀůŸƳƜŷųžƚŵƁŭŹƕűūŹŻƹƻƚŵƁŭŹƌŷŽŽűưƻƷƳſŸŸŶżƓųżżůƅưƅƲƀŮŬůŹžŬŮŻŮƇưƄƴŪƀŶūżƥƹƲƋŻſƐŻŮųūůſŻƳƁŨŽƣżƤƜŶűųƋƛƊƒƛŹưƕƘƚƞŶŭƭơźƇƫŧżƀƎƇƌƭƊƱƳŽƜƍůŴƒƖŰƕŰơƝƎƁƜŷƮƨŲơųƍžƊƀūŧƫŻƘƍƬżűƘŧŪŪƌƎŨƑŧƖƕŧƘŸƠƭűƛƱƞžũƛſƁƆƂŵƕŽƕƖſŴŶƂƀƜưƘƛưƼŬƤƬƭƮƪƬƪƲƨƩƱƯƬƬƩƯƭưƱƻƥǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁžűžŭųżŴŬƳŻŻŭƝŴżŵŻųŮƞŨƙżƹƻƚŵƁŭŹƌŷŽŽűưƻƷƳŹŲųŽŮƙƎƓƕǂƣǁžűžŭųżŴŬƳŻŻŭƝŴżŵŻųŮƞŨƙżƹƻƚŵƁŭŹƌŷŽŽűưƻƷƳŹŲųŽŮƙƎƓƕƧǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀŤťŽƀŮŽŹƺŻƸŧţŤŽŴŮŽǀŦǂǀǁǂǀǁǂǀǁǂǀǁǂǀūƁŮǁŹżǁƥǀƺƜŴƀůŸƋŹżżųƯƂųžŷŽŽŭƚſŮƒŴƀũŻůƻƥǁǂǀǁǂǀǁǂǀǁǂǀǁŹźǁƺżŲſūŴŽŲŭƴŹżŮƛŵŽųżŴŬƟũƗŽǂƺƻǂżŲſūŴŽŲŭƴŹżŮƛŵŽųżŴŬƟũƗŽƺŷŽƹƷǁǂǀǁǂǀǁǂǀǁǂǀǁŧǀǁǂǀǁǂǀǁǂǀǁǂǀǁǂǀǁžűžŭųżŴŬƳŻŻŭƝŴżŵŻųŮƞŨƙżƹŹżƸƴŪƀŶūżǂƣǁƻźƀŶŭżƻƥǁǂǀǁǂǀǁǂǀǁǂǀǁťǀŤ');</script><br />
</div><br />
<br />
Is it correct? Please assist me....
cheers
sneha
cheers,
sneha
|
|
|
|
|
use embed will solve your problem, i think
<embed src="~/VISUALISE.SWF" style="HEIGHT: 331px; LEFT: 83px; TOP: 171px; WIDTH: 538px" />
|
|
|
|
|
Hi Padmanabhan,
Thanks for replying. Actually the gallery is database driven. I am using hyperlinks in datalist control. When user will click any link then the corresponding video will be played in the player.
padmanabhan N wrote: <embed src="~/VISUALISE.SWF" style="HEIGHT: 331px; LEFT: 83px; TOP: 171px; WIDTH: 538px" />
will this work in my scenerio?
cheers,
sneha
|
|
|
|
|
|
sneha Choudhary wrote: <embed src="~/VISUALISE.SWF" style="HEIGHT: 331px; LEFT: 83px; TOP: 171px; WIDTH: 538px" />
will this work in my scenerio?
Yes - It should work for you, just change the source on each hyperlink click.
Coding C#
www.excitetemplate.com
|
|
|
|
|
i have a dropdown list i it has a different datafield(CouponName) and datavalue(CouponTypeID). i want that when i select a datafield it save datavalue in database so i make this code but it show error
input string was not in a correct format
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
ErrorMessage.Text = "";
cnx.Open();
SqlCommand insertCmd = new SqlCommand("insert into CouponTransaction(CouponTypeID)values(@id)", cnx);
insertCmd.Parameters.Add("@Id", SqlDbType.TinyInt);
insertCmd.Parameters["@Id"].Value =Int32.Parse (ddlCType.SelectedValue);
insertCmd.ExecuteNonQuery();
ErrorMessage.Text = "Records inserted successfully";
cnx.Close();
}
catch (Exception ex)
{
ErrorMessage.Text = ex.Message;
}
|
|
|
|
|
Good day haleemasher
Change your code to
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
ErrorMessage.Text = "";
cnx.Open();
SqlCommand insertCmd = new SqlCommand("insert into CouponTransaction(CouponTypeID)values(@id)", cnx);
insertCmd.Parameters.Add("@Id", SqlDbType.int);
insertCmd.Parameters["@Id"].Value = Convert.ToInt32(ToddlCType.SelectedValue);
insertCmd.ExecuteNonQuery();
ErrorMessage.Text = "Records inserted successfully";
cnx.Close();
}
catch (Exception ex)
{
ErrorMessage.Text = ex.Message;
}
You must put a break point and check what results you get from the selected value. it might have returned an empty string that is why you got that error. You must stop assuming the input from the user is correct.
Try it and tell me what it does
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.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
modified on Friday, August 14, 2009 5:37 AM
|
|
|
|
|
when i change my code as u suggested it show error System.convert.Tonint32(object) is a method, which is not valid in the given context
the datatype of my ID is tinyint.
|
|
|
|
|
i have change the bold part , go to the thread and check again.
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.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
|
Where is happening exactly. what line ?
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.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
haleemasher wrote: input string was not in a correct format
in which line it shows this error
|
|
|
|
|
insertCmd.Parameters.Add("@Id", SqlDbType.Int );
it show error at this line
|
|
|
|
|
insertCmd.Parameters.Add("@Id", SqlDbType.Int );
insertCmd.Parameters["@Id"].Value =Int.Parse(ddlCType.SelectedValue);
if the error still occurs check the ID is integer or not....
|
|
|
|
|
my id datatype is tinyint
|
|
|
|
|
i dono whether i am correct but try to create a interger and parse your tineyint and assing it to the interger which you have crated, then pass the interger value as a parameter....
|
|
|
|
|
sorry not getting your point
|
|
|
|
|
insertCmd.Parameters.Add("@Id", SqlDbType.TinyInt); insertCmd.Parameters["@Id"].Value =Int32.Parse (ddlCType.SelectedValue);
instead of this...
insertCmd.Parameters.Add("@Id", SqlDbType.TinyInt);
int id = int.parse(ddlCType.SelectedValue);
insertCmd.Parameters["@Id"].Value =id;
|
|
|
|
|
|
Put a break point on the line with the error. What is the value of ddlCType.SelectedValue when the error occurs?
|
|
|
|
|
Check if what ever you are trying to convert to int is int actually.
Check if the value in SelectedValue is actually a integer.
Coding C#
www.excitetemplate.com
|
|
|
|
|
i want to bind a girdview with a formview so when i select data in gridview it show in form view and there i edit and insert data.
any link of article??
|
|
|
|
|
You cannot bind a gridview with a form view, because the form view is not a Data source. You can Bind a Grid and on selectedindexchange of the grid you bind the Form View based on the selection that is made.
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.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
you can create a custom control for your requiremnt...
|
|
|
|