|
You can use the Firefox error console to get the line and a detailed error message.
|
|
|
|
|
document.getelementbyid('yourButtonId').click();
I didn't get any requirements for the signature
|
|
|
|
|
Error is at line __doPostBack( 'TextBox1','');
"object expected"
|
|
|
|
|
That's not what I meant.
Drag a button onto your form. Double click the button in design view to generate server side method.
Add the following in the page_load (server side code)
this.Button1.Style.Add("display", "none");
Add the following javascript to your page.
function CallServerMethod() {
var Button1 = document.getElementById("<%=Button1.ClientID %>");
Button1.click();
}
In your javascript replace
__doPostBack( 'TextBox1','');
with
CallServerMethod()
Add server side code to Button1_Click() event
I didn't get any requirements for the signature
|
|
|
|
|
I want to convert my database of SQL server 2000 (.mdf) File to MS Access Database(.mdb)File using C# Code.
|
|
|
|
|
Vishal09 wrote: I want to convert my database of SQL server 2000 (.mdf) File to MS Access Database(.mdb)File using C# Code.
Why don't you export the data directly?
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Why??
If you just need to access the data in Access, you can set up tables that link to the SQL server database...
|
|
|
|
|
Stop trying to make sense and supply the code for him. Now get on it.
I didn't get any requirements for the signature
|
|
|
|
|
ASALAMOALEKUM All,
I am working with video chat.. (web application ASP.NET with C#)
For this I am using VidGrab SDK... refernces have been added successfully but the problem is control is not visible in the toolbox.
(where as when i go with it on windows application in the same way, its control is visible)
As far as i have searched, with web application, controls are added in different ways but those ways are not defined..
can anyone help me out..
if we have to write some html code for designing control, then please refer any article which explains how to write... coz i didnt get related article!
"If there is anyother SDK or way for online video chat please recommend"
waiting for reply !
Thanks!
take care
Regards,
SANA
$@N@
|
|
|
|
|
So, does this SDK have a web control, or just a windows one ? Why not ask they people who wrote the SDK you bought for help ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I'm having an unusual problem where a control of type System.Web.UI.WebControls.Dropdownlist is somehow disappearing when I select 'Save' on my form. I've gone through my code a couple of times and I'm not explicitly altering its Visible property.
Control ProductVersion is disappearing when I select 'Save'. In the code this is captured within protected void btnMultifunction_Click(object sender, EventArgs e)
Here's the code ...
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;
using System.Data.SqlClient;
using System.IO;
public partial class TaskEntry : System.Web.UI.Page
{
private const string _DBConnString = "Data Source=JCAMILLERI\\SQLEXPRESS;Initial Catalog=teamwiki;User ID=teamwiki;Password=password;";
private SqlConnection _conAppDB = new SqlConnection(_DBConnString);
private enum multifunctionButtonFunction {Create, Update, NoUpdate}
private int _selectedProduct = 0;
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (!IsPostBack) {
_conAppDB.Open();
Product.Items.Clear();
SqlCommand _getProductSQL = new SqlCommand
(@"select [productID_PK], [product] + ' (' + [product_shortname] + ')' as product
from [teamwiki].[dbo].[product_L]
where [in_use] = 1
order by [product] ASC", _conAppDB);
SqlDataReader _ProductNames = _getProductSQL.ExecuteReader();
Product.DataSource = _ProductNames;
Product.DataTextField = "product";
Product.DataValueField = "productID_PK";
Product.DataBind();
_ProductNames.Close();
}
}
catch (Exception ex) {
throw ex; }
finally {
if (_conAppDB.State == ConnectionState.Open)
{ _conAppDB.Close(); }
}
}
protected void btnMultifunction_Click(object sender, EventArgs e)
{
multifunctionButtonFunction ButtonMode = multifunctionButtonFunction.Create;
if (btnMultifunction.Text == "Create new task")
{
Product.Enabled = true;
calIdealDeliveryDate.Enabled = true;
calLatestDeliveryDate.Enabled = true;
txtRequestedBy.Enabled = true;
lstTaskSubCategory.Enabled = true;
txtTaskDescription.Enabled = true;
lstPriority.Enabled = true;
btnMultifunction.Text = "Save";
ButtonMode = multifunctionButtonFunction.Update;
}
else if (btnMultifunction.Text == "Save") {
Product.Enabled = false;
ProductVersion.Visible = true;
ProductVersion.Enabled = false;
calIdealDeliveryDate.Enabled = false;
calLatestDeliveryDate.Enabled = false;
txtRequestedBy.Enabled = false;
lstTaskSubCategory.Enabled = false;
txtTaskDescription.Enabled = false;
lstPriority.Enabled = false;
if (calIdealDeliveryDate.SelectedDate < DateTime.Now && ButtonMode == multifunctionButtonFunction.Update)
{
Response.Write("Dates cannot be in the past");
ButtonMode = multifunctionButtonFunction.NoUpdate;
}
if (calLatestDeliveryDate.SelectedDate < DateTime.Now)
{
Response.Write("Date cannot be in the past");
ButtonMode = multifunctionButtonFunction.NoUpdate;
}
if (ButtonMode != multifunctionButtonFunction.NoUpdate) {
try
{
_conAppDB.Open();
string _createNewTaskQuery = (@"INSERT INTO [teamwiki].[dbo].[task]
([category_FK1]
,[sub_category_FK2]
,[task_description]
,[priority_FK3]
,[status_FK4]
,[start_date]
,[ideal_delivery_date]
,[latest_delivery_date]
,[task_deadline]
,[request_date]
,[requesting_user]
,[assigned_to]
,[managed_by]
,[implementor_notes]
,[attachment]
,[last_update]
,[in_use]
,[productID_FK5]
,[product_release_FK6])
VALUES ( @category,
@sub_category,
@task_description,
@priority,
@status,
NULL,
@ideal_delivery_date,
@latest_delivery_date,
NULL,
GETDATE(),
@requesting_user,
NULL,
NULL,
NULL,
NULL,
GETDATE(),
@in_use,
@product,
@product_release)");
SqlCommand cmdCreateNewTaskQuery = new SqlCommand(_createNewTaskQuery, _conAppDB);
cmdCreateNewTaskQuery.Parameters.AddWithValue("@category", Global.TaskCategory);
cmdCreateNewTaskQuery.Parameters.AddWithValue("@sub_category", lstTaskSubCategory.SelectedValue);
cmdCreateNewTaskQuery.Parameters.AddWithValue("@task_description", txtTaskDescription.Text);
cmdCreateNewTaskQuery.Parameters.AddWithValue("@priority", 1);
cmdCreateNewTaskQuery.Parameters.AddWithValue("@status", 1);
cmdCreateNewTaskQuery.Parameters.AddWithValue("@ideal_delivery_date", calIdealDeliveryDate.SelectedDate);
cmdCreateNewTaskQuery.Parameters.AddWithValue("@latest_delivery_date", calLatestDeliveryDate.SelectedDate);
cmdCreateNewTaskQuery.Parameters.AddWithValue("@requesting_user", txtRequestedBy.Text);
cmdCreateNewTaskQuery.Parameters.AddWithValue("@in_use", 1);
cmdCreateNewTaskQuery.Parameters.AddWithValue("@product", 1);
cmdCreateNewTaskQuery.Parameters.AddWithValue("@product_release", 1);
cmdCreateNewTaskQuery.ExecuteNonQuery();
string getTaskRef = @"SELECT MAX([taskID_PK]) FROM [teamwiki].[dbo].[task];";
SqlCommand getTaskRefSQL = new SqlCommand(getTaskRef, _conAppDB);
object taskRef = getTaskRefSQL.ExecuteScalar();
if (taskRef != DBNull.Value)
{
txtTaskRef.Text = taskRef.ToString();
}
btnMultifunction.Enabled = false;
}
catch (InvalidCastException)
{
}
catch (Exception ex)
{
throw ex;
}
finally {
_conAppDB.Close();
}
}
}
}
protected void lstPriority_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void txtIdealDeliveryDate_TextChanged(object sender, EventArgs e)
{
}
protected void calLatestDeliveryDate_SelectionChanged(object sender, EventArgs e)
{
}
protected void Products_SelectedIndexChanged(object sender, EventArgs e)
{
if (ProductVersion.Visible == false){
ProductVersion.Visible = true;
ProductVersion.Enabled = true;
string _selectedProduct_s = Product.SelectedValue.ToString();
if (int.TryParse(_selectedProduct_s, out _selectedProduct) == false)
{
throw new Exception();
}
try
{
_conAppDB.Open();
ProductVersion.Items.Clear();
SqlCommand _getProductVersionSQL = new SqlCommand
(@"select product_releaseID_PK, version
from [teamwiki].[dbo].[product_release]
where [in_use] = 1
and productID_FK2 = @productID;", _conAppDB);
_getProductVersionSQL.Parameters.AddWithValue("@productID", _selectedProduct);
SqlDataReader _ProductVersion = _getProductVersionSQL.ExecuteReader();
ProductVersion.DataSource = _ProductVersion;
ProductVersion.DataTextField = "version";
ProductVersion.DataValueField = "product_releaseID_PK";
ProductVersion.DataBind();
_ProductVersion.Close();
}
catch (Exception ex) {
throw ex;
}
finally {
_conAppDB.Close();
}
}
}
protected void ProductVersion_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
Jon
|
|
|
|
|
So why do you post your whole code, noone is going to read this long thing, you should have shown us only the code in the button.
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
vuyiswam@its.co.za
|
|
|
|
|
I'm not sure where to look otherwise I would have posted the relevant snippets...I've gone through the code a couple of times, and, being human, spotted no logical flaws where I set explicit changes to Dropdownlist.Visible. The dropdownlist is initially set to Visible = false through the UI, but that shouldn't affect me.
When I give up I'll call a real programmer
Jon
|
|
|
|
|
jon_80 wrote: When I give up I'll call a real programmer
I've looked at the code. Give up now; make the call.
only two letters away from being an asset
|
|
|
|
|
Hi.
I want to serialize an object, then insert it in DB without creating xml file.(just serialize and insert in DB)
Really, I couldn't find a way to serialize it without creatn an xml file. (that's my problem)
Best wishes
|
|
|
|
|
string outputText = string.Empty;
List<string> strings = new List<string>();
using (MemoryStream ms = new MemoryStream())
{
XmlSerializer s = new XmlSerializer(typeof(List<String>));
s.Serialize(ms, strings);
using (StreamReader sw = new StreamReader(ms))
{
outputText = sw.ReadToEnd();
}
}
|
|
|
|
|
I am developing shopping cart application. i am populating the selected row values in another datatable and binded it to another grid. I am havind a textbox in new grid. the value entered in the textbox got refreshed when a row is added to this grid. i used update panel also. any solution.............?
|
|
|
|
|
May be because of postback.
|
|
|
|
|
Hi thanks for ur reply.ya its because of postback only.But how to retain the value of text box.
|
|
|
|
|
EnableViewState ppty set to true for the txtbox/aspx
Thanks & Regards,
Jeneesh k. v.
|
|
|
|
|
Hi,
I had a problem. I can access my ASP.NET application through localhost and also
through my IP in my system.
But I am unable to connect from other system which is in same LAN. I was able
to access before but now I am not able to access
from other system. Is there anything to set in my IIS? Pls help me regarding
this.
I tried and check with these options:
1,Iam able to ping (ASP.NET application running system) from other system..
2,I turn off windows firewalls on localhost--(windows xp)
3,while running application on localhost it's giving
url http://localhost:1310/abomp/HomePage.aspx
4,iam trying with http://192.168.0.36/abomp/HomePage.aspx --(another system)..
is there any wrong process..
Waiting for ur response.
murali krishna
|
|
|
|
|
Well you have to use the port 1310, since the app is not at the default port for http (80).
So for outside you have to use
http://192.168.0.36:1310/abomp/HomePage.aspx
Regards
Sebastian
|
|
|
|
|
This seems to vexing a few people out on the web but the answers are less that useful.
I've had to go from .NET 1.0 to 2.0
My web has many asp.net 'drag and drop' required field validators. It used the WebUIValidators.js in the aspnet_client folder from the framework to complete the auto generated javascript. As we know this is not there in 2.0 and now my web pages render 'Done, but with error'.
Do I?
1. Replace all the validators in VS2005, rebuild and put live, will this work?
2. Copy the WebUIValidation.js script, make a .js file, paste it in my project and reference that?
3. Do some other more elegant solution?
Thanks for any help.
Harvey
modified on Wednesday, February 4, 2009 6:16 AM
|
|
|
|
|
Pick one forum and stick with it. Cross posting won't get you an answer any faster.
only two letters away from being an asset
|
|
|
|
|
Hai All,
In my apolication i ve to prevent Gridview(Asp.Net 2005)scrolling of Header , when we scroll it verically and
ve to scroll when we scroll it Horizontally.
I did it.But problem i ve to change culture
when i used english it is working
but when i used Arabic it wont
Any idea?
|
|
|
|
|