|
You can't. Why would you want to ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
First, I used LinkButton in my project to transfer the page. But in some browsers javascript may be disabled. In that situation Linkbutton won't work. So, I used Button to transfer the page. If the button's caption is too long it won't wrap the text. So, I tried for ImageButton and placed the text to be displayed as link in "Alternate Text". It works fine in Mozila i.e. if the link is for 4 lines, the imagebutton automatically resized. But in IE 6 a cross mark is displayed for the image not given and the link text didn't resized.
Now my problem is which control to select for displaying the links. Please give me an idea.
Thanks.
|
|
|
|
|
If you want to work where there is no javascript, then just use pure HTML for your links. However, I'm not sure how much ASP.NET is going to work without javascript, you're going to have to test everything and assume nothing.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have text box to which I want to assign a required filed Validator like
But I want to get the error message from code behind like
<asp:textbox id="TextBox1" runat="server" xmlns:asp="#unknown">
<asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" controltovalidate="TextBox1" xmlns:asp="#unknown">
ErrorMessage='<%=ErrorMessage %>' //get from codebehhind ValidationGroup="grpNew">
But I am unable to do this I know this is rather simple from codebehind like
In codebehind
TextBox1.ErrorMessage= ErrorMessage //( where error message is public property from )
How can I achieve same thing from aspx page . I found one way like using page.databind , but this effects the view state of other controls so please any one help me.
Or it would be better also if some one could tell me how can I assign error message property for textbox in aspx (html) page ( taking error message from global resources file)
|
|
|
|
|
can one guid me how can i print formated text...???
i m using infragistic htmleditor and i want to print its body area as it is any sugession????
umerumerumer
|
|
|
|
|
You have no control over printing via a website.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
How to give two headers lines in datagrid like parent header and child header. For Example, 'Fruits' should be the parent head. Apple, Orange and Mango should be the child head.
Tnx in adv.
Balasubramanian K.
|
|
|
|
|
You would be best to use repeaters to get that level of control, with a nested table.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
I have found that we need to supply the coordinates for different hotspot controls. Do we have a tool, which will tell us the coordinates for the diffrent parts of a picture.
Many thanks for you help....
|
|
|
|
|
Windows Paint.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
How can we use paint to find out the coodinates as used in the block below?
phs = new PolygonHotSpot();
phs.Coordinates = "92,82,101,95,85,95";
phs.PostBackValue = "Nose";
ImageMap1.HotSpots.Add(phs);
e.g. "92,82,101,95,85,95"
|
|
|
|
|
Dear friends,
I m facing a problem while developing my application for which i need u people's help.
I have a master page for all the webpages of my application. In one of my page named default.aspx there is a button on whose click event i have used the clientscript as
ClientScript.RegisterStartupScript(typeof(Page), "ShowMessage","javascript: alert('Button clicked');");
now the sequence of events that take place on the button click event is:
1. Default.aspx page load takes place.
2. MasterPage Page load event takes place.
3. Button click event code (the clientscript written above)
The problem is :
after the above 3 steps executes the Alert message showing "Button Clicked" is coming on a blank page and when we click OK of the alert then only my Default.aspx page comes. I don't want the alert to pop up on a blank page. Instead first the page should get loaded and then only the alert message should come.
While working on this problem, i removed the master page and then checked. The page was successfully getting loaded first and then only the alert messgae was coming. I guess the presence of the master page has something to do with it.
Please help me in solving this problem.
|
|
|
|
|
Register like
Scriptmanager.RegisterStartupScript(typeof(Page), "ShowMessage","<script>javascript: alert('Button clicked');</script>");
Cheers!!
Brij
|
|
|
|
|
Dear Brij,
Thanks for responding to my problem but i guess your solution doesn't work.
there is no such library as scriptmanager.
i used clientScriptManager and tried the code
ClientScriptManager csm = Page.ClientScript;
csm.RegisterStartupScript(typeof(Page), "alert", alert('Cannot Register');<script>");
but in vain. Please help me if u have any other possible solution.
|
|
|
|
|
Try Calling this function
On body Onload at client side
<body onload="ShowMessage();" />
|
|
|
|
|
hi,
I have a problem regarding the reset button on my aspx page.
A brief description.
I have aspx page on which over 10 text boxes are there with a save and reset button.
when I have clicked on the reset button it should clear all values in the text boxes.
it is doing the same, but when I click the "Reset" Button second time.
I think I made a mistake on the page load while calling the javascript funtions.
txtCNumber.Attributes.Add("onKeyPress", "javascript:return Integersonly_special(this, event);");
txtMNumber.Attributes.Add("onKeyPress", "javascript:return Integersonly_space(this, event);");
txtFName.Attributes.Add("onKeyPress", "javascript:return Alphabitsonly_space(this, event);");
txtLName.Attributes.Add("onKeyPress", "javascript:return Alphabits_and_nospace(this, event);");
txtEmpId.Attributes.Add("onKeyPress", "javascript:return Alphabits_and_integers(this, event);");
txtRemarks.Attributes.Add("onKeyPress", "javascript:return Remarks(this, event);");
I have doubt using this Attributes concept.
Can any body help me regading this.
your
peter
modified on Friday, November 21, 2008 8:57 AM
|
|
|
|
|
Hi peter,
There seems to be no problem with Attributes.Add and any ways events are getting fired on KeyPress so if at all they have any problem it will be evident when u enter any value in textboxes.
Are u firing any JavaScript on Reset button ,
Please check if you are doing so,also debug the code on first click of Reset to check what happens .
Regards
Nishant
|
|
|
|
|
Hi ,
I am developing a web application.I need an interface in my application
which will allow the user to send the fax domestic /international.I
dont want to use 3rd party tool /service .Does anybody have idea how to
achieve this functonality.
Web Developer
|
|
|
|
|
shames(Sam) wrote: I
dont want to use 3rd party tool /service .Does anybody have idea how to
achieve this functonality.
Your other option is prayer.
There's no fax functionality built in, that's why third party tools exist.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have a javascript on my page that handels onkey event:
function OnKeyPress(evt)
{
if(this.GetKey(evt)==13)
{
var txtCtrl=this.GetTextBoxCtrl();
var sBtnIDtoClick=txtCtrl.getAttribute('btnIDtoClick');
if(sBtnIDtoClick != "")
{
var btnControl = document.getElementById(sBtnIDtoClick);
btnControl.click();
}
}
return true;
}
This works fine in Internet Explorer 7.0 but not for IE 6.0. (The problem is that the
btnControl.click(); is not fired)
All other JavaSripts works fine, like:
function OnKeyUp(evt)
{
var nKey;
nKey=this.GetKey(evt);
if ((nKey!=38) && (nKey!=40) && (nKey!=13))
{
var sNewValue;
sNewValue=this.GetTextBoxValue();
}
}
Anyone know why?
Thanks
Thomas
|
|
|
|
|
Wild guess - it's not supported in IE 6.0.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have a problem with textbox and dropdownlist.
My form contains ddl's,txt's and some other controls.
On the pageload i am filling dropdown with some list.
While Inserting values into database,
for example,i am using a dropdownlist only for display.If i want to add some data of that dropdownlist kind,i am using textbox.
The requirement is
If i enter some text,it shd check in the dropdownlist.If it has the same value,it should focus on the dropdownlist value,so that user can select it.It will come into the textbox.
This i want when he is trying to add some value(Not on the button click event,keyboard press time.).It should check from the dropdownlist values.
Plese try to understand and solve my little problem.
THanks in advnace.
I am using asp.net 1.1,with sqlsever2000.
REgards
kissy
|
|
|
|
|
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ClientCallback : System.Web.UI.Page,
System.Web.UI.ICallbackEventHandler
{
protected System.Collections.Specialized.ListDictionary catalog;
protected String returnValue;
protected void Page_Load(object sender, EventArgs e)
{
String cbReference =
Page.ClientScript.GetCallbackEventReference(this,
"arg", "ReceiveServerData", "context");
String callbackScript;
callbackScript = "function CallServer(arg, context)" +
"{ " + cbReference + ";}";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(),
"CallServer", callbackScript, true);
if(!Page.IsPostBack)
{
ddstate.DataSource = objnewdoc.fillddstate();
ddstate.DataValueField = objnewdoc.fillddstate().Tables[0].Columns[0].ToString();
ddstate.DataTextField = objnewdoc.fillddstate().Tables[0].Columns[1].ToString();
ddstate.DataBind();
ddstate.Items.Capacity = ddstate.Items.Capacity + 1;
ListItem lt = new ListItem();
lt.Text = "<-Select State->";
lt.Value = "0";
ddstate.Items.Insert(0, lt);
ListItem ltcity = new ListItem();
ltcity.Text = "<-Select->";
ltcity.Value = "0";
ddcity.Items.Insert(0, ltcity);
}
//catalog = new System.Collections.Specialized.ListDictionary();
//catalog.Add("monitor", 12);
//catalog.Add("laptop", 10);
//catalog.Add("keyboard", 23);
//catalog.Add("mouse", 17);
//ListBox1.DataSource = catalog;
//ListBox1.DataTextField = "key";
//ListBox1.DataBind();
}
public void RaiseCallbackEvent(String eventArgument)
{
if (catalog[eventArgument] == null)
{
returnValue = "-1";
}
else
{
DataSet dsCity = objnewdoc.GetCityID(eventArgument);
returnValue = dsCity.Tables[0].Rows[0][0].ToString();
for (int cnt = 1; cnt < dsCity.Tables[0].Rows.Count; cnt++)
{
returnValue = returnValue + "," + dsCity.Tables[0].Rows[cnt][0].ToString();
}
string returnText = dsCity.Tables[0].Rows[0][1].ToString();
for (int cnt = 1; cnt < dsCity.Tables[0].Rows.Count; cnt++)
{
returnText = returnText + "," + dsCity.Tables[0].Rows[cnt][1].ToString();
}
returnValue = returnValue + ";" + returnText;
}
}
public String GetCallbackResult()
{
return returnValue;
}
}
page
]]>
1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<title>Client Callback Example
function LookUpStock()
{
//
var lb = document.getElementById("ddstate");
var product = lb.options[lb.selectedIndex].value;
CallServer(product, "");
}
function ReceiveServerData(rValue)
{
document.getElementById("ResultsSpan").innerHTML = rValue;
var opt = document.createElement("option");
// Add an Option object to Drop Down/List Box
var myStringListValues = rValue.split(';');
// Assign text and value to Option object
var myStringListValue = myStringListValues[0].split(',');
var myStringListText =myStringListValues[1].split(',');
while (document.getElementById("ddcity").hasChildNodes())
document.getElementById("ddcity").removeChild(document.getElementById("ddcity").childNodes[0]);
document.getElementById("ddcity").options[document.getElementById("ddcity").length] = new Option('Select','0');
for(cnt=0;myStringListValue.length>cnt;cnt++)
{
document.getElementById("ddcity").options[document.getElementById("ddcity").length] = new Option(myStringListText[cnt],myStringListValue[cnt]);
}
}
<asp:listbox id="ListBox1" runat="server" xmlns:asp="#unknown">
Look Up Stock
Items in stock:
<asp:listbox id="lt2" runat="server" xmlns:asp="#unknown">
<asp:dropdownlist onchange="LookUpStock()" id="ddstate" runat="server" xmlns:asp="#unknown">
<asp:dropdownlist id="ddcity" runat="server" xmlns:asp="#unknown">
|
|
|
|
|
Hi,
If I am not wrong you want to check whether the value you are entering in textbox already exist in DropDown ?
Well U can extensively use JavaScript for this purpose,
On KeyPress event of the TextBox
Compare the Value in TextBox with DropDownList options
if it matches any Value of DropDownList using substring method
(ie if Text in the Textbox is found to be the Substring of any existing value of DropDownList Set that option as selected )
This should be the approach according to me.
Give me a Day or 2 iwill try to implement it myself
|
|
|
|
|
Hi any one help me ,
i want drag and drop image on other image after adjust by crop,roteted,compose and save in database (ms-access)in asp.net
Towards the success..
|
|
|
|