|
able to fix the same thanks a lot sundar.
my approach was
1)i pass the div id which opens the page using querystring url
2)raise a method in parent from popup to execute and pass this divid (which i read from querystring using javascript code) and use it to refresh the parent update panel
3)the method in parent has code to refresh the respective update panel passed as parameter to it.
Thanks a lot once again sundar
Rama Charan Prasad
"Be happy and Keep smiling.Thats what u want be always.. "
|
|
|
|
|
Sometimes we get problems like "Invalid postback or callback argument"
For this we set enableeventvalidation to false in page directive and problem get solved.
Here I want to know what are the drawbacks of setting enableeventvalidation to false in page directive???
|
|
|
|
|
actually i have a database table have four fields rnkid, rnkartid,rnkuserid and rnk marks i want sum all the marks which have same rnk art id . pls hel tell how
|
|
|
|
|
Please Don't Cross post !
|
|
|
|
|
actually i have a database table have four fields rnkid, rnkartid,rnkuserid and rnk marks i want sum all the marks which have same rnk art id . pls hel tell how
|
|
|
|
|
You are in wrong forum. This is a simple SQL Query
|
|
|
|
|
Hi,
I am using a regular expression validator to validate my email textbox but I was wondering if there is an expression that allows only a certain domain. This is what I'm using so far:
<asp:regularexpressionvalidator id="RegularExpressionValidator1" runat="server" controltovalidate="txtEmail" validationexpression="^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$" errormessage="Please enter an email address in the form xyz@abc.com" xmlns:asp="#unknown"></asp:regularexpressionvalidator>
This works, but it allows any @abc.com and I only want to allow a specific address (i.e. only allow @yahoo.com).I'm using asp.net and c#.
Thanks!
|
|
|
|
|
validationexpression="^\w+[\w-\.]*\@DomainName.com"
i hope this works
Rama Charan Prasad
"Be happy and Keep smiling.Thats what u want be always.. "
|
|
|
|
|
I'm looking for a datagrid that will allow vertical and horizontal scrolling as well keep the headers for the columns visible at all times.
|
|
|
|
|
Here[^] you can find some articles which will solve the problem.
|
|
|
|
|
Is it worth my while battling with the learning curve of the telerik reporting tool, or battling with trying to add grouping to GridViews? Any other recommendations?
|
|
|
|
|
I would try the Telerik reporting tool. Because if you get stuck, you can post some questions on Telerik's site and they will help you out.
I didn't get any requirements for the signature
|
|
|
|
|
Yeah, I think I'm going with it. I was looking at the Infragistics grid, but it's a bit heavyweight and twice the price. I just wonder how these people can make such awkward designers. People that complain about Microsoft's designers in Visual Studio don't seem to use many other designers.
|
|
|
|
|
I believe using Telerik control will be a better idea as Telerik controls have more features. Based on the documentation and their examples, learning Telerik controls give you much better presentation as well.
Bhaskara
|
|
|
|
|
If you are developing against MS-SQL server, why not consider SQL Server Reporting ? No extra charge if you alreay have MS-SQL server. My 2 cents.
|
|
|
|
|
I need to be able to switch the application between MySQL and MS SQL.
|
|
|
|
|
I'm trying to execute a simple command and pass it to a text box, however it does not seem to work.
Any idea why?
try
{
conAppDB.Open();
string getTaskRef = @"SELECT MAX([taskID_PK]) FROM [teamwiki].[dbo].[task];";
SqlCommand getTaskRefSQL = new SqlCommand(getTaskRef, conAppDB);
if (getTaskRefSQL != null)
{
txtTaskRef.Text = (string)getTaskRefSQL.ExecuteScalar();
}
}
catch (InvalidCastException)
{
}
catch (Exception ex)
{
throw ex;
}
finally {
conAppDB.Close();
}
Environment
.NET framework 2.0.50727 SP1
Visual Studio 2005 Team Edition
Jon
|
|
|
|
|
Have you tried running your sql directly? It may not be returning any data.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Troubleshooting.
I tried using the following line and it returned the expected value on the screen, hence the SQL is working.
Response.Write(getTaskRefSQL.ExecuteScalar());
Jon
|
|
|
|
|
The result of ExecuteScalar can be one of three things.
1. An object of the type you expect. String in this case
2. a DBNull which means that the value of the column you've selected is null
3. a null which means that the query returned no data. (please check for this rather than use an invalid cast exception)
Now, on to what you asked about:
jon_80 wrote: Although the code passes through here, the value of getTaskRefSQL is null, is this a bug?
Are you sue that getTaskRefSQL is null. Unless you've missed something out of your code in the sample above there is no way getTaskRefSQL can be null at the point in the code you've said it is.
|
|
|
|
|
Colin Angus Mackay wrote: jon_80 wrote:
Although the code passes through here, the value of getTaskRefSQL is null, is this a bug?
Are you sue that getTaskRefSQL is null. Unless you've missed something out of your code in the sample above there is no way getTaskRefSQL can be null at the point in the code you've said it is.
That's what I thought; I checked again and now it has a value, however before it was reading null in the watch window
Colin Angus Mackay wrote: The result of ExecuteScalar can be one of three things.
1. An object of the type you expect. String in this case
2. a DBNull which means that the value of the column you've selected is null
3. a null which means that the query returned no data. (please check for this rather than use an invalid cast exception)
Explicit conversion was required because implicit conversion is not allowed by the compiler. I think can check for a DBNull using typeof presumably, however, since a value is being returned I'm not sure why the conversion is not working.
Related links:
http://msdn.microsoft.com/en-us/library/58918ffs(VS.71).aspx[^]
Jon
|
|
|
|
|
jon_80 wrote: Explicit conversion was required because implicit conversion is not allowed by the compiler.
I wasn't talking about that.
jon_80 wrote: I think can check for a DBNull using typeof presumably
Try something like:
object rawValue = theSqlCommand.ExecuteScalar();
if (rawValue == DBNull.Value)
{
}
else
{
string actualValue = (string)rawValue;
}
|
|
|
|
|
|
|
You're right I still haven't planned any error handling as yet
Jon
|
|
|
|