|
|
for now i can use show in *.aspx page but when click on to insert how i should do to call value of my control into new record ...
for other record i use texrbox like this
<asp:TextBox ID="txtAddress" runat="server" Text='<%# Bind("Address") %>' MaxLength="4000" Width="100%" class="field text addr"></asp:TextBox>
for user control to input BirthDay ---
<control:Dateinput ID="DateinputBD" runat ="server" />
|
|
|
|
|
i have designed registration form. in that i used a calender for date of birth and date of join . just i drag and dropped the calender and textbox for date of birth.means whatever the date i have choosen in that calender it must appear over the textbox.here my constraint is doj must be greater than date of birth.
for this i need validation controls and validation expressions without javascript
if i used the validation controls like regular expression validator and compare validator then it is raising the validation even i gave the date of join greater than date of birth and date of join less than date of birth. help me in this regard as soon as possible
please help me in this regard
|
|
|
|
|
You can use Custom Validator and in that you can have Javascript code or server side code too. It is upto you.
Regards,
Kaushal Arora
|
|
|
|
|
I have grid view with teo fields.I want bind the records of particular row to the corresponding textboxes while clicking on the particular row.....I used the "onclick" command for getting clickable on that row but dont know how bind the records to their corresponding textbox...Please help me...Here is the code
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!IsPostBack)<br />
{<br />
binding();<br />
<br />
}<br />
void binding()<br />
{<br />
con.Open();<br />
cmd = new SqlCommand();<br />
cmd.CommandType = CommandType.Text;<br />
cmd.CommandText = "Select * from student";<br />
cmd.Connection = con;<br />
SqlDataAdapter ad = new SqlDataAdapter(cmd);<br />
DataSet ds = new DataSet();<br />
ad.Fill(ds);<br />
GridView1.DataSource = ds.Tables[0];<br />
GridView1.DataBind();<br />
}<br />
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)<br />
{<br />
if (e.Row.RowType == DataControlRowType.DataRow)<br />
{<br />
if (e.Row.DataItemIndex == -1)<br />
return;<br />
e.Row.Attributes.Add("onMouseOver","this.style.cursor='hand';");<br />
e.Row.Attributes.Add("onclick",<br />
this.GetPostBackClientEvent(GridView1,"Select$" + e.Row.RowIndex.ToString())); <br />
}<br />
<br />
Thanks in advance
Thileepan
|
|
|
|
|
Dear All,
I've seen some websites (on the email page) they put one textbox and one image "displays as characters or numbers". When they want to send email on that page, they must put the character or number to the textbox then click the send button otherwise they cannot send the email. What is it called?
How to do this on (asp.net with c sharp)?
Thank you so much,
Visoth
|
|
|
|
|
The thing is called "CAPTCHA" and for the help you can google search or you will find various articles for the same in CodeProject.
Regards,
Kaushal Arora
Please mark as Answer if it solved your problem.
|
|
|
|
|
Many thanks to your answer!
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
I am not understand session state or view state. please!
|
|
|
|
|
Hi,
Refer below link for what is session state and how to save and read values in session state.
http://msdn.microsoft.com/en-us/library/6ad7zeeb.aspx[^]
Brief about session state and view state:
View State are valid mainly during postbacks and information is stored in client only.
Viewstate are valid for serializable data only.
Moreover Viewstate are not secured as data is exposed to client.It get stored in browser.
Although we can configure page directive and machine key to make view state encrypted.
Session State- this is user specific data that is stored in server memory . Session state is valid for any type of objects. We can take help of session through different web pages also. But yes this is valid till that user's session.
Hope this is of help.
Cheers
Shilpa
|
|
|
|
|
Hi
I am really stuck in not being able to apply my Cascading Style Sheets to the nodes of my treeview. Using the tag Hover Style in the TreeView control I applied CSS, but when I run the application the hover style is not being applied, and I don't why. Also I have another problem with the same TreeVIew in that where there is a url in my SiteMap the color changes from that in the CSS, and I am unable to get those nodes, Parent or Child, to be the same as those which don't have a url.
Can anyone please help me.
Thanks
|
|
|
|
|
Can u give me an example how can I create a Gridview programatically.
|
|
|
|
|
Why, is google broken where you live ? What have you tried ? Where are you stuck ?
GridView gv = new GridView();
this.Controls.Add(gv);
Of course, you'll have issues with things like defining templates, and viewstate. Why do you need to create one programatically ? Do you need an infinite number of gridviews ?
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 )
|
|
|
|
|
Yes I need almost 25 different Gridviews to show.
|
|
|
|
|
1.first u have to create the data table
2.then u have to add column.
dt = new DataTable();
DataColumn dcol = new DataColumn(ID, typeof(System.Int32));
dt.Columns.Add(dcol);
Then create the new Datarow and add '
create bound field
assign header text
add this bound field to the column .
and at last bind it
|
|
|
|
|
I have a listview in which i definited a layout and item template. in the item template there is a checkbox that isn't bound to any data. it's there for me to check the code-behind which rows were selected or not. however, on postback, the checkbox's checked property always comes back false. i tried using a radio button just to test with, and the results were the same. the changed values of unbound controls inside my asp.net listview control do not get carried over.
is there a setting or some way for me to get this done ?
|
|
|
|
|
|
you know i tried something like that, using jquery though to set the hidden field value when the checkbox was clicked. i think the problem was that i had the hidden field in the listview. I'll trying placing it outside the listview templates and see if that works
|
|
|
|
|
Hi,
I have one menu in my web form with three items. Each item has further 25 subitems. If I click on one of this subitem it should show me a Grid view in the same page. I didn't find any property like onclick for submenu items. It NavigationUrl property. But I want to stay on the same page and just want to show Gridview in the same page by clicking on subitem I have selected
|
|
|
|
|
I am trying to write a simple asp page. in .aspx page I am writing a javascript function and in the code behind trying to call the function.
>>>>>> The error is: Object Expected
javascript:
<asp:button id="Button1" runat="server" text="Button">
function Confirm()
{
alert("yes");
}
in code behind:
Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.RegisterStartupScript("Startup", "Confirm();")
End Sub
Please help!
|
|
|
|
|
You could actually use OnclientClick to call your method. It would just have to return false to avoid a postback.
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 )
|
|
|
|
|
hello
Question:
i get "Access denied" error.Can anyone convert the code below in JSON i need to access data from some other domain. OR any other fully explained efficient method to access cross domains plz.
---------js file--------------
window.onload=makeRequest;
function makeRequest()
{
var http_request={};
if (window.XMLHttpRequest)
{ // Mozilla, Safari,...
http_request = new XMLHttpRequest();
}
else
{
http_request=new ActiveXObject("Msxml2.XMLHTTP");
}
http_request.open("GET", "http://www.uclocal.com/LX-U.aspx?", false);
http_request.onreadystatechange=function()
{
if(http_request.readyState==3)
{
alert("data is loading...please wait");
}
else
if(http_request.readyState==4)
{
if(http_request.status==200)
{
document.write(http_request.responseText);
}
}
}
http_request.send();
}
|
|
|
|
|
you need a proxy, goolge it
|
|
|
|
|
hiya!
i need to provide a free business directory on my website.i am planning to make business
directory as a webservice.users will b accessing from different domains.
question 1: is it possible to implement my idea as a webservice in visual basic and will it
be accessible from anywhere?
question 2: is there any cross domain security issues if i implement as my idea webservice?
question 3:is there any other issues. for example someone has made a website in c# .net or
php? They want to load my business directory in their website page's body or div would it
be possible?
Hannah
|
|
|
|
|
Seems like you should buy a book and read it. Hannah is my daughters name, so I will cut you a break:
1 - of course. If it's on the web, it's on the web
2 - anyone can call a webservice, but you can add security, just like you can for a website.
3 - It wouldn't matter, b/c all that matters is your output. How the output of your webservice gets into another webpage, is entirely the problem of the person writing that site.
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 )
|
|
|
|