|
HI
Thanks for your attention
I mean that when i debug my website,IE said "can not find server".
|
|
|
|
|
i have a dropdownlist which a different values on its textchanged i want to populate two textboxs. one to show Maximum Serial end and another show Serial End.
when i select 3 value in textbox it works as i like. but other than 3 i slect any value it show error There is not row at position 0
protected void DropDownList1_TextChanged(object sender, EventArgs e)
{
cnx.Open();
SqlCommand ddlcmd = new SqlCommand();
commandText = "SELECT MAX(CouponTransaction.SerialEnd),CouponType.Price FROM CouponType INNER JOIN CouponTransaction ON CouponType.CouponTypeID = CouponTransaction.CouponTypeID WHERE CouponType.CouponName= '" + ddlCType.SelectedValue + "'GROUP BY CouponType.Price";
ds = new DataSet();
ds = GetData(commandText);
txtSFrom.Text =ds.Tables[0].Rows[0][0].ToString();
Txtprice.Text = ds.Tables[0].Rows[0][1].ToString();
cnx.Close();
}
|
|
|
|
|
ds = new DataSet();
ds = GetData(commandText);
if(ds.rows.count !=0)
{
txtSFrom.Text =ds.Tables[0].Rows[0][0].ToString();
Txtprice.Text = ds.Tables[0].Rows[0][1].ToString();
}
cnx.Close();
|
|
|
|
|
it show error in if statement that Doesn't contain definition for Rows"
|
|
|
|
|
sorry,
change it as
if(ds.Tables[0].Rows.count)
|
|
|
|
|
thnx its working thank u very much
|
|
|
|
|
I suggest you to always check count before fetching indexed elements.
if(ds.Tables.count >0)
{
if(ds.Tables[0].Rows.count > 0)
{
if(ds.Tables[0].Columns.Count >=2)
{
txtSFrom.Text = ds.Tables[0].Rows[0][0].ToString();
Txtprice.Text = ds.Tables[0].Rows[0][1].ToString();
}
}
}
like this.
|
|
|
|
|
|
Cheers
|
|
|
|
|
Hi all,
Im checking the password strength using JS. It works fine in IE but not in Mozila . Can any one solve my problem please. Here is the script.
<script language="javascript" type ="text/javascript">
function check_password_safety(pwd)
{
var msg = "";
var len= pwd.length;
var i;
var has_letter = new RegExp("[a-z]");
var has_caps = new RegExp("[A-Z]");
var has_numbers = new RegExp("[0-9]");
var has_symbols = new RegExp("\\W");
var pointsLetter=0;
var pointsCaps=0;
var pointsNumbers=0;
var pointsSpecials=0;
for(i=0;i<len;i++)
{
var x=pwd.charAt(i);
if(has_letter.test(x))
{
++pointsLetter;
}
else if(has_caps.test(x))
{
++pointsCaps;
}
else if(has_numbers.test(x))
{
++pointsNumbers;
}
else if(has_symbols.test(x))
{
++pointsSpecials;
}
}
if(len>6)
{
if(pointsLetter>0 && pointsCaps==0 && pointsNumbers==0 && pointsSpecials==0 && len>12)
{
password_info.innerHTML = "Very Week";
password_info.className='Style_VeryWeek';
}
if(pointsLetter>0 && pointsCaps==0 && pointsNumbers==0 && pointsSpecials==0 && len<12)
{
password_info.innerHTML = "Week";
password_info.className='Style_Week';
}
if(pointsLetter==0 && pointsCaps==0 && pointsNumbers>0 && pointsSpecials==0)
{
password_info.innerHTML = "Week";
password_info.className='Style_Week';
}
if(pointsLetter==0 && pointsCaps>0 && pointsNumbers==0 && pointsSpecials==0)
{
password_info.innerHTML = "Week";
password_info.className='Style_Week';
}
if(pointsLetter==0 && pointsCaps==0 && pointsNumbers==0 && pointsSpecials>0)
{
password_info.innerHTML = "Week";
password_info.className='Style_Week';
}
if(pointsLetter>0 && pointsCaps==0 && pointsNumbers>0 && pointsSpecials==0)
{
password_info.innerHTML = "Medium";
password_info.className='Style_Medium';
}
if(pointsLetter>0 && pointsCaps==0 && pointsNumbers==0 && pointsSpecials>0)
{
password_info.innerHTML = "Strong";
password_info.className='Style_Strong';
}
if(pointsLetter>0 && pointsCaps>0 && pointsNumbers==0 && pointsSpecials==0)
{
password_info.innerHTML = "Medium";
password_info.className='Style_Medium';
}
if(pointsLetter>0 && pointsCaps>0 && pointsNumbers>0 && pointsSpecials==0)
{
password_info.innerHTML = "Strong";
password_info.className='Style_Strong';
}
if(pointsLetter>0 && pointsCaps>0 && pointsNumbers==0 && pointsSpecials>0)
{
password_info.innerHTML = "Strong";
password_info.className='Style_Strong';
}
if(pointsLetter>0 && pointsCaps>0 && pointsNumbers>0 && pointsSpecials>0)
{
password_info.innerHTML = "Very Strong";
password_info.className='Style_VeryStrong';
}
if(pointsLetter>0 && pointsCaps==0 && pointsNumbers>0 && pointsSpecials>0)
{
password_info.innerHTML = "Very Strong";
password_info.className='Style_VeryStrong';
}
}
else
{
if(len!=0)
{
password_info.innerHTML ="Minimum Length 6 Charecters";
password_info.className='Style_Minimum';
}
else
{
password_info.innerHTML ="Type Password";
password_info.className='Style_Normal';
}
}
}
</script>
|
|
|
|
|
if i am not wrong!!!!! some of the script will not work in Mozila.....
|
|
|
|
|
First try to find out with the help of Alert() that which line of code is not working so can easily help you.
|
|
|
|
|
there is nothing written wrong in the code. The only thing that comes into my notice is
password_info.innerHTML
Always remove the existing childelements before you set the innerHTML, so that if there is any child elements present, IE will throw an error.
Use like this :
function setContent(container, content) {
if (!!container) {
while (container.firstChild)
container.removeChild(container.firstChild);
var dummyDiv = document.createElement('div');
dummyDiv.innerHTML = content;
container.appendChild(dummyDiv);
}
}
Now call setContent(password_info,"yourhtml")
On your problem, I think there must be problem somewhere else. Check Mozilla Error Console for that entry.
|
|
|
|
|
please help me to how load the image into modal popup from DataList
i coded as below but it didn't work
<table cellpadding="0" cellspacing="0">
<tr><td><asp:DataList ID="dlPartner" runat="server" RepeatDirection="Horizontal"
RepeatColumns="5">
<ItemTemplate>
<table cellpadding="5" cellspacing="20" border="0">
<tr><td>
<table>
<tr><td>
<asp:ImageButton ID="imgLogo" ImageUrl='<%#"~/Data/"+Eval("Logo")+"" %>' runat="server" CommandArgument='<%#Eval("ID") %>' OnCommand="imgLogo_Click"/>
</td></tr>
<tr><td align="center">
<asp:Label Text='<%# Eval("Name") %>' runat="server" CssClass="partnerDataListFormatting" Font-Bold="true"></asp:Label>
</td></tr>
<tr><td align="center">
<asp:Label Text='<%# Eval("Country") %>' runat="server" CssClass="partnerDataListFormatting"></asp:Label>
</td></tr>
</table>
</td></tr>
</table>
</ItemTemplate>
</asp:DataList></td></tr>
<tr><td><asp:Label ID="lblInfo" runat="server"></asp:Label>
</td></tr>
<tr><td><asp:Panel ID="pnlPopup" runat="server" CssClass="ModalPopupBG">
<div>Hello world</div>
</asp:Panel></td></tr>
<tr><td><asp:Button ID="btnHiddenClickToModalPopUp" runat="server"
Text="CLick" />
<cc1:ModalPopupExtender ID="ModalPopupExtender1" TargetControlID="btnHiddenClickToModalPopUp" PopupControlID="pnlPopup" runat="server"
DropShadow="true">
</cc1:ModalPopupExtender></td></tr>
</table>
</td>
</tr>
</table>
|
|
|
|
|
123chaminda wrote: coded as below but it didn't work
you havn't metioned the error what you are getting....
|
|
|
|
|
hii all...
i hav populated a dropdownlist at pageload.
now i have textbnox i want to display the name in textbox according to the id selected in the dropdown list.Initially when pageloads it
displays the name in textbox according to the value in the dropdown but when i change the item in the dropdown it not works.The textbox value does not change.plz guide me.also i hav made the autopostback property of dropdown true.the code is:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
PopulateDDL1();
string str = "Select * From Vendor Where(VendorID='" + DropDownList1.SelectedValue + "')";
SqlCommand cmd = new SqlCommand(str, conn);
SqlDataReader dr = null;
conn.Open();
dr = cmd.ExecuteReader();
while (dr.Read())
{
TextBox1.Text = dr["VendorName"].ToString();
}
conn.Close();
}
}
public void PopulateDDL1()
{
SqlCommand cmd = new SqlCommand("Select * From [Vendor]", new SqlConnection(ConfigurationManager.ConnectionStrings["BillingSystem"].ConnectionString));
cmd.Connection.Open();
SqlDataReader dr;
dr = cmd.ExecuteReader();
DropDownList1.DataSource = dr;
DropDownList1.DataValueField = "VendorID";
DropDownList1.DataTextField = "VendorID";
DropDownList1.DataBind();
cmd.Connection.Close();
}
|
|
|
|
|
where is the dropdown SelectedIndexChanged event... write your code in that event
|
|
|
|
|
thanmks sir,
its workin now...
Regard's
parikshit
|
|
|
|
|
Just do one thing............open ur internet explorer browser and type www.google.co.in and then find out the solution...........simple
|
|
|
|
|
The thing is if DropDown Autopostback = true , the page will be posted back to the server. It will generate Page_Load event and the respective DropDown.SelectedIndexChanged event.
As I can see you have populated Dropdown inside the !IsPostBack statement, I think the post back event will not run any line from Page_Load (Which I think is perfect).
The only reason that may come, if you have written something inside dropdown.selectedIndexChanged event which changes the original selection with the initial value.
Please check if PopulateDDL1 is called from elsewhere or not.
|
|
|
|
|
Hi,
There is a web form and after user select certain option - the page reloads.
There are like 3-4 such options where page reloads according to the user selection but everytime after page reloads - page focus moves to the top. But i want that to the same loaction where user select that option.
How can i achieve this page focus bit.
Thank You
Andyyy
|
|
|
|
|
You have to use Ajax. in your Visual Studio toolbox there is a Ajax Section and the is an Update panel. Please Google Update panel.
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/
|
|
|
|
|
AndyInUK wrote: There is a web form and after user select certain option - the page reloads
after finishing that option set the focus to the desired location by using focus() method.
|
|
|
|
|
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
|
|
|
|