|
Hi can any one help me..
I need to disply a girdview with empty datasource .
and with messege "No Items" in the position of first record.
footer with textboxs to insert the record into gridview.
|
|
|
|
|
It cane achieved in different ways in-order to logic.
a) Generate the header with column defination and add a blank datarow to dataset with required stucture badis on condition if your query doesnot returned any record.
2) In order to effective go with ajax.
|
|
|
|
|
it is very easy.
just set the empty data template of gridview.
for eg.
EmptyDataTemplate
No Rows
/EmptyDataTemplate
Regards
Keyur Satyadev
|
|
|
|
|
Hi Team,
Functional required is to get the entered value in the dynamic generated textbox.
1)After Page Rendered,Textboxes generated based on Dropdownlist value.
2) if we choose value "2" from dropdownlist then it will create two textboxes dynamincally and the control is add in the hirarchy control
textbox--->tablecell--->tablerow--->table---panelcontrol.
3)after textbox generated i entered value in generated textboxes and try to get the value in server control i'e on buttton click.
but due to postback the dynamic generated control are not found by findcontrol method.
could Anybody help me out from this scenario.
Tarun Singh
Zenta Pvt Ltd.
|
|
|
|
|
It should be there in the contro array of the panel control.. at the worst case add the the instance of the textbox to an arraylist at the same time when you add it to the page...
|
|
|
|
|
Hi Shyam,
Control generated properly and entered value get by javascript also but when i tried to get the value via button click. control not found due to postback event.
|
|
|
|
|
How can i do it in asp.net so that my webpage detect the browser and open the page according to it.
or what id coding to detect the user's browser..
|
|
|
|
|
I think the below script will help you.
script type="text/javascript>
script type="text/javascript">
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number
if (ffversion>=3)
document.write("You're using FF 3.x or above")
else if (ffversion>=2)
document.write("You're using FF 2.x")
else if (ffversion>=1)
document.write("You're using FF 1.x")
}
else
document.write("n/a")
|
|
|
|
|
Yea. even Request.Browser property from server side tells you a lot
|
|
|
|
|
Yes,if you go through for serverside conding but if you want to check via client side then, we have go refer script code.
|
|
|
|
|
first of all i would like to suggest that your site must be
run in all the browser. you don't need to detect browser.
for your answer you can use javascript at client side because
it execute on client side thier is no load to server and u can
detect the browser type using in built function.
u have to use inbuilt function of java script. ie.
using getbrowser() method you can get the name and verson of browser.
Regards,
Keyur Satyadev
|
|
|
|
|
I am writing code to pass two parameter to stored procedure in page load.
i am getting maximum one lakh hits in one hour on that page.but my page take time to load so my page miss some hits.is it better if i cut my code from page load and paste on page init event.
is it required to call page load event for calling only stored procedure whome i am passing values from query string.or please tell me how can i improve performance and speed of my page
|
|
|
|
|
What the hell is a lakh ?
Page init runs every time, just like page load. IF you're getting a lot of hits and they all run a stored proc, ask yourself how often the data changes, and if you could cache the result.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus wrote: What the hell is a lakh ?
he he he...some people assume and throw local lingo on any thing.
lakh = 100,000 used in India and southeast asia.
Yusuf
|
|
|
|
|
Hi,
I am using Asp.Net 2.0 application, First i have created database dynamically in my codebehind. well the db created successfully. Now i want to give username and password dynamically for my dynamically created database. Is it possible? If yes, please tell me how can we do?
Try
Dim strQuery As String
strName = txtName.Value
strQuery = "create database db" & strName & ""
createDataBase(strQuery)
Catch ex As Exception
End Try
End Sub
'Function for create database
Function createDataBase(ByVal strQuery)
Try
Dim blnResults As Boolean = False
Dim intRowsAffected As Integer
ConOpen()
Try
objCmd = New SqlCommand
objCmd.Connection = objCnn
objCmd.CommandType = CommandType.Text
objCmd.CommandText = strQuery
intRowsAffected = objCmd.ExecuteNonQuery()
If intRowsAffected > 0 Then blnResults = True
Catch ex As Exception
createDataBase = ex.Message
'MsgBox(ex.Message)
Exit Try
Finally
ConClose()
End Try
Exit_Function:
createDataBase = blnResults
Catch ex As Exception
End Try
Return Nothing
End Function
The above one is created database dynamically in code behind. I need to create username and password dynamically in code behind.
Hope yours reply.
Every Successful Person Have A Painful Story
|
|
|
|
|
Hello Friends,
I'm establishing a connection between ASP.NET and MySql. But i'm getting following error
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Here i'm also providing my ConnectionString below
<connectionStrings>
<add name="ConnectionString" connectionString="Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=totalbhakti_new;uid=root;pwd=; />
</connectionStrings>
Actually MySql which is installed on my system is with PHP(using Wamp Server). Is that the reason behind throwing the error
|
|
|
|
|
If MySQL is on the local machine, I'd not have expected the DB to be tied to PHP, unless it's that the PHP server locks it somehow.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi to All,
What is Content Management System(CMS) & Knowledge Management System(KMS)?
how CMS relates with KMS?
Advandages & disadvandages of CMS & KMS??
Thanks,
NKMKrishna
|
|
|
|
|
nkmkrishna wrote: What is Content Management System(CMS)
Its is a system which manages content
nkmkrishna wrote: Knowledge Management System(KMS)
It is a system which manages Knowledge.
nkmkrishna wrote: how CMS relates with KMS?
Im guessing sometimes there is content associated with knowledge.
further reading[^]
|
|
|
|
|
Hello All,
I want to send image tag in Response.Write how can I achieve this..
I am doing like this
Response.Write(" ");
know the problem I have is I am giving creating multiple images, that should be at the location of control where I am using it.
But It is not working ....
Any suggestion what should i do.....
Thanks in advance
Regards
|
|
|
|
|
Try Single quote,
Response.Write(" <img alt='' src='Images/2.jpg' style='height: 37px; width: 40px' />");
This should work.
|
|
|
|
|
What are the main pain points of ajax. what are the point/decisions we need to consider before deciding to go for an ajax based framework in our application
|
|
|
|
|
Do you have a need for AJAX. That's it, really.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i want to export dataset at runtime to an excel file. i had tried but in vain. Pleaae help me with some link to work out.
Thnks in advance.
|
|
|
|
|
Hi Bhavna,
The requirement is fissible via Gridview control or XmlDocument
but I think your requirement is without gridview,
We need to do the requirement as below
DataSet DS = somevalueDataSet();
XmlDataDocument xdd = new XmlDataDocument(DS);
XslTransform xt = new XslTransform();
string workingdir = AppDomain.CurrentDomain.BaseDirectory + "/" + "xslSheet.xsl";
xt.Load(workingdir);
string dirPath = AppDomain.CurrentDomain.BaseDirectory + "/" + "GeneratedFR";
string filePath = AppDomain.CurrentDomain.BaseDirectory + "/" + "GeneratedFR" + "/" + "Test1.xls";
if (!Directory.Exists(dirPath))
{
Directory.CreateDirectory(dirPath);
}
File.Delete(filePath);
FileStream fs = new FileStream(filePath, FileMode.Create);
using(fs)
{
xt.Transform(xdd,null,fs);
fs.Close();
}
|
|
|
|